Skip to content

Commit

Permalink
feat: expose hasAnchor to custom placeholder function (#2470)
Browse files Browse the repository at this point in the history
* expose hasAnchor to custom placeholder function

* Update placeholder.ts
  • Loading branch information
YousefED committed Feb 3, 2022
1 parent 9ffc4ab commit 2fe6e21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/extension-placeholder/src/placeholder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface PlaceholderOptions {
showOnlyWhenEditable: boolean,
showOnlyCurrent: boolean,
includeChildren: boolean,
hasAnchor: boolean,
}

export const Placeholder = Extension.create<PlaceholderOptions>({
Expand Down Expand Up @@ -61,6 +62,7 @@ export const Placeholder = Extension.create<PlaceholderOptions>({
editor: this.editor,
node,
pos,
hasAnchor,
})
: this.options.placeholder,
})
Expand Down

0 comments on commit 2fe6e21

Please sign in to comment.