Skip to content

Export getTextSerializersFromSchema helper, and fix typo in its name#2750

Merged
bdbch merged 2 commits intoueberdosis:mainfrom
sjdemartini:export-text-serializers-util
May 17, 2022
Merged

Export getTextSerializersFromSchema helper, and fix typo in its name#2750
bdbch merged 2 commits intoueberdosis:mainfrom
sjdemartini:export-text-serializers-util

Conversation

@sjdemartini
Copy link
Contributor

For plugins and other user-defined extensions, it's useful to be able to be able to use the text-serializers-from-schema helper, like is done in the built-in clipboardTextSerializer extension:

const textSerializers = getTextSeralizersFromSchema(schema)

This is necessary to be able to fully take advantage of the getText/generateText methods introduced here #1875, if you want to be able to generate text for individual ranges/nodes in a document rather than the entire document.

This PR exports that getTextSerializersFromSchema function, and also corrects a typo in its name (file and function)—Seralizers --> Serializers. Related to #2740 but doesn't solve its particular ask.

For plugins and other user-defined extensions, it's useful to be able to
be able to use the text-serializers-from-schema helper, like is done in
the built-in clipboardTextSerializer extension
(https://github.com/ueberdosis/tiptap/blob/43611ea2e70d3dc66ff907ba7ca377bf74814543/packages/core/src/extensions/clipboardTextSerializer.ts#L21).
@netlify
Copy link

netlify bot commented May 2, 2022

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit 0ce7c5b
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/627039c1899e4300085f1b62
😎 Deploy Preview https://deploy-preview-2750--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@bdbch bdbch self-assigned this May 17, 2022
@bdbch bdbch merged commit 819622c into ueberdosis:main May 17, 2022
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