Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export core/serialization to Trix global #1110

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

manubo
Copy link

@manubo manubo commented Nov 30, 2023

Export core/serialization to the Trix global

This will allow to serialize the contents to HTML, e.g.:

const html = Trix.core.serialization.serializeToContentType(element, "text/html")

or

const html = Trix.core.serialization.serializeToContentType(element.editor.getDocument(), "text/html")

In version 1, serializers where also available via the Trix global, e.g.

const html = Trix.serializers["text/html"](document)

This PR will provide the same functionality for version 2.

@manubo
Copy link
Author

manubo commented Dec 4, 2023

The tests failed on the CI with an error that seemed not related to the changes made. Locally, the tests execute successfully.

I pushed an empty commit to trigger CI again and would appreciate, if you could re-approve the test-workflow again, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant