Skip to content

Export core/serialization to Trix global#1110

Open
manubo wants to merge 1 commit into
basecamp:mainfrom
manubo:export-serialization
Open

Export core/serialization to Trix global#1110
manubo wants to merge 1 commit into
basecamp:mainfrom
manubo:export-serialization

Conversation

@manubo

@manubo manubo commented Nov 30, 2023

Copy link
Copy Markdown

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

manubo commented Dec 4, 2023

Copy link
Copy Markdown
Author

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!

@manubo manubo force-pushed the export-serialization branch 3 times, most recently from 411f966 to 2ed995b Compare January 31, 2025 12:16
@nethad

nethad commented Jun 5, 2026

Copy link
Copy Markdown

@flavorjones any chance that this PR could be merged? If not, any feedback on how to improve it? Thank you!

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.

2 participants