feat: expose hasAnchor to custom placeholder function (#2470)

* expose hasAnchor to custom placeholder function

* Update placeholder.ts
This commit is contained in:
Yousef 2022-02-03 14:39:15 +01:00 committed by GitHub
parent 9ffc4ab7c8
commit 2fe6e2135d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,7 @@ export interface PlaceholderOptions {
showOnlyWhenEditable: boolean, showOnlyWhenEditable: boolean,
showOnlyCurrent: boolean, showOnlyCurrent: boolean,
includeChildren: boolean, includeChildren: boolean,
hasAnchor: boolean,
} }
export const Placeholder = Extension.create<PlaceholderOptions>({ export const Placeholder = Extension.create<PlaceholderOptions>({
@ -61,6 +62,7 @@ export const Placeholder = Extension.create<PlaceholderOptions>({
editor: this.editor, editor: this.editor,
node, node,
pos, pos,
hasAnchor,
}) })
: this.options.placeholder, : this.options.placeholder,
}) })