feat: add getText() and generateText() methods (fix #1428) (#1875)

* move getTextBetween method

* add getText method

* refactoring

* refactoring

* refactoring

* move renderText to schema, add generateText method

* add GenerateText demo

* docs: update

* remove demo from html page
This commit is contained in:
Philipp Kühn
2021-09-09 23:51:05 +02:00
committed by GitHub
parent 42e8755d87
commit fe6a3e7491
15 changed files with 241 additions and 64 deletions

View File

@@ -379,12 +379,13 @@ declare module '@tiptap/core' {
this: {
name: string,
options: Options,
editor: Editor,
type: NodeType,
parent: ParentConfig<NodeConfig<Options>>['renderText'],
},
props: {
node: ProseMirrorNode,
pos: number,
parent: ProseMirrorNode,
index: number,
}
) => string) | null,