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