-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't update editorProps
after initialization.
#1518
Comments
I agree, this is a pretty big problem. This is public setOptions(options: Partial<EditorOptions> = {}): void {
this.options = { ...this.options, ...options }
} I'm not sure what the problem is, this should work? Unless |
The problem is that options.editorProps is not an actual reference to ProseMirror tiptap/packages/core/src/Editor.ts Lines 231 to 238 in 939fc3d
I've created a fix and creating a PR (waiting for all tests to run...) |
Beautiful! Thanks! |
Description
I haven't found a way to add or modify
editorProps
after initialization – callingeditor.setOptions({ editorProps: { ... }
does not work, neither does modifyingeditor.options.editorProps.*
directly.Steps to reproduce the bug
CodeSandbox
I created a CodeSandbox to help you debug the issue.
Expected behavior
EditorProps are modified, i.e. in the example my custom transformPastedHTML is being called
Environment?
Additional context
I've tried several, but not all, other editorProps to validate is present on more than one prop.
The text was updated successfully, but these errors were encountered: