-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat: add getText() and generateText() methods (fix #1428) #1875
Conversation
Oh damn 🙌 Very nice addition. Comes in handy as I won't need the tokeniser for flexsearch anymore! |
@philippkuehn I think the |
@BrianHung But I serialize only a part of the doc based on the current selection. Is there any issue with the current solution? |
Ah nevermind; I see the |
Is there any way to make the positions of the text output by getText() the same as the positons in the editor? Especially the text in the table |
This PR adds two methods
getText()
andgenerateText()
. You can define text rendering of nodes with therenderText
config. This is mostly useful for atom nodes like hard breaks, mentions etc.usage of
getText()
usage of
generateText()