From eb5374321b09e8b4a8e89dcc620d0ed4a2657f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Tue, 12 Oct 2021 23:30:30 +0200 Subject: [PATCH] feat: add pos to placeholder props --- packages/extension-placeholder/src/placeholder.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/extension-placeholder/src/placeholder.ts b/packages/extension-placeholder/src/placeholder.ts index 423dacd6f..c5e25ba04 100644 --- a/packages/extension-placeholder/src/placeholder.ts +++ b/packages/extension-placeholder/src/placeholder.ts @@ -9,6 +9,7 @@ export interface PlaceholderOptions { placeholder: ((PlaceholderProps: { editor: Editor, node: ProsemirrorNode, + pos: number, }) => string) | string, showOnlyWhenEditable: boolean, showOnlyCurrent: boolean, @@ -57,6 +58,7 @@ export const Placeholder = Extension.create({ ? this.options.placeholder({ editor: this.editor, node, + pos, }) : this.options.placeholder, })