Skip to content

Commit 71fb6a2

Browse files
author
robin
committed
fix(editor-stacks/Component): enhance onChange plugin to include editor instance reference
1 parent b6a9486 commit 71fb6a2

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

editor-stacks/Component.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,12 @@ const Component: FC<EditorProps> = ({
132132
: undefined,
133133
editorPlugins: onChange
134134
? [
135-
createOnChangePlugin((content) => {
136-
onChangeRef.current?.(content);
137-
}),
135+
createOnChangePlugin(
136+
() => editorInstanceRef.current,
137+
(content: string) => {
138+
onChangeRef.current?.(content);
139+
}
140+
),
138141
]
139142
: [],
140143
});

0 commit comments

Comments
 (0)