Skip to content

Commit

Permalink
feat: add pos to placeholder props
Browse files Browse the repository at this point in the history
  • Loading branch information
philippkuehn committed Oct 12, 2021
1 parent a06213f commit eb53743
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 @@ -9,6 +9,7 @@ export interface PlaceholderOptions {
placeholder: ((PlaceholderProps: {
editor: Editor,
node: ProsemirrorNode,
pos: number,
}) => string) | string,
showOnlyWhenEditable: boolean,
showOnlyCurrent: boolean,
Expand Down Expand Up @@ -57,6 +58,7 @@ export const Placeholder = Extension.create<PlaceholderOptions>({
? this.options.placeholder({
editor: this.editor,
node,
pos,
})
: this.options.placeholder,
})
Expand Down

0 comments on commit eb53743

Please sign in to comment.