mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 11:49:02 +08:00
feat: add pos to placeholder props
This commit is contained in:
parent
a06213f137
commit
eb5374321b
@ -9,6 +9,7 @@ export interface PlaceholderOptions {
|
||||
placeholder: ((PlaceholderProps: {
|
||||
editor: Editor,
|
||||
node: ProsemirrorNode,
|
||||
pos: number,
|
||||
}) => string) | string,
|
||||
showOnlyWhenEditable: boolean,
|
||||
showOnlyCurrent: boolean,
|
||||
@ -57,6 +58,7 @@ export const Placeholder = Extension.create<PlaceholderOptions>({
|
||||
? this.options.placeholder({
|
||||
editor: this.editor,
|
||||
node,
|
||||
pos,
|
||||
})
|
||||
: this.options.placeholder,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user