mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-18 04:57:49 +08:00
feat: expose hasAnchor to custom placeholder function (#2470)
* expose hasAnchor to custom placeholder function * Update placeholder.ts
This commit is contained in:
parent
9ffc4ab7c8
commit
2fe6e2135d
@ -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,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user