feat: add pos to placeholder props
This commit is contained in:
@@ -9,6 +9,7 @@ export interface PlaceholderOptions {
|
|||||||
placeholder: ((PlaceholderProps: {
|
placeholder: ((PlaceholderProps: {
|
||||||
editor: Editor,
|
editor: Editor,
|
||||||
node: ProsemirrorNode,
|
node: ProsemirrorNode,
|
||||||
|
pos: number,
|
||||||
}) => string) | string,
|
}) => string) | string,
|
||||||
showOnlyWhenEditable: boolean,
|
showOnlyWhenEditable: boolean,
|
||||||
showOnlyCurrent: boolean,
|
showOnlyCurrent: boolean,
|
||||||
@@ -57,6 +58,7 @@ export const Placeholder = Extension.create<PlaceholderOptions>({
|
|||||||
? this.options.placeholder({
|
? this.options.placeholder({
|
||||||
editor: this.editor,
|
editor: this.editor,
|
||||||
node,
|
node,
|
||||||
|
pos,
|
||||||
})
|
})
|
||||||
: this.options.placeholder,
|
: this.options.placeholder,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user