-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: more accurate typing for element option
#6972
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
Conversation
🦋 Changeset detectedLatest commit: 4bd6d51 The changes in this PR will be included in the next version bump. This PR includes changesets to release 69 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@tiptap/extension-character-count
@tiptap/extension-dropcursor
@tiptap/extension-gapcursor
@tiptap/extension-focus
@tiptap/extension-history
@tiptap/extension-list-item
@tiptap/extension-list-keymap
@tiptap/extension-placeholder
@tiptap/extension-table-cell
@tiptap/extension-table-header
@tiptap/extension-table-row
@tiptap/extension-task-item
@tiptap/extension-task-list
@tiptap/core
@tiptap/extension-blockquote
@tiptap/extension-bubble-menu
@tiptap/extension-bold
@tiptap/extension-bullet-list
@tiptap/extension-code-block-lowlight
@tiptap/extension-code
@tiptap/extension-code-block
@tiptap/extension-collaboration
@tiptap/extension-collaboration-caret
@tiptap/extension-color
@tiptap/extension-details
@tiptap/extension-document
@tiptap/extension-drag-handle
@tiptap/extension-drag-handle-vue-2
@tiptap/extension-drag-handle-react
@tiptap/extension-file-handler
@tiptap/extension-emoji
@tiptap/extension-drag-handle-vue-3
@tiptap/extension-font-family
@tiptap/extension-floating-menu
@tiptap/extension-hard-break
@tiptap/extension-heading
@tiptap/extension-highlight
@tiptap/extension-horizontal-rule
@tiptap/extension-image
@tiptap/extension-invisible-characters
@tiptap/extension-italic
@tiptap/extension-mathematics
@tiptap/extension-list
@tiptap/extension-link
@tiptap/extension-node-range
@tiptap/extension-mention
@tiptap/extension-ordered-list
@tiptap/extension-paragraph
@tiptap/extension-strike
@tiptap/extension-subscript
@tiptap/extension-table
@tiptap/extension-superscript
@tiptap/extension-table-of-contents
@tiptap/extension-text-align
@tiptap/extension-text
@tiptap/extension-text-style
@tiptap/extension-typography
@tiptap/extension-underline
@tiptap/extension-unique-id
@tiptap/extension-youtube
@tiptap/extensions
@tiptap/react
@tiptap/html
@tiptap/pm
@tiptap/starter-kit
@tiptap/static-renderer
@tiptap/suggestion
@tiptap/vue-2
@tiptap/vue-3
commit: |
Improve typing and documentation for EditorOptions.element, detailing supported mounting modes and behavior alignment across adapters.
|
Why is this not considered a breaking change? |
|
In my tests this change didn't lead to breaking change, at least in it's intended change, maybe something unintended is caused by this PR which we should rather fix? What problem are you running into that is different to the previous version? |
|
I access I can change this on my end without too much hassle, but nonetheless I would not expect incompatible changes to public API types on a semver-minor update. |
|
Would disagree that just any external types changes should be considered breaking. Just because the options happened to be exposed does not mean that they are yours to rely on, they are the editor's options after-all? |
|
I'm not sure how I am to know what I can and cannot rely on then, when an interface is publicly exposed & documented. At any rate, it's not my intention to argue about this. I will fix my code and consider |
|
In the future I'll take a closer look and think about the implications of a change a bit more before releasing. Thanks for bringing it up @soren121. |
|
Turns out this PR introduced a bug, see #7282 (comment) |
Fixes a regression introduced by ueberdosis#6972, that resulted in elements that got appended to the editors parent node staying detached. E.g. the drag handle plugin is affected by this regression. Fixes: ueberdosis#7282 Signed-off-by: Jonas <jonas@freesources.org>
Fixes a regression introduced by ueberdosis#6972, that resulted in elements that got appended to the editors parent node staying detached. E.g. the drag handle plugin is affected by this regression. Fixes: ueberdosis#7282 Signed-off-by: Jonas <jonas@freesources.org>
Changes Overview
This changes the
elementoption on theEditorto more accurately reflect the different ways that ProseMirror can mount it's view. There are 3 options (see docs here):{mount: HTMLElement}which mounts to that element (A pretty useful thing to get rid of the wrapper div)This now exposes the options & changes the react & vue bindings to pull the correct element from the
editor.view.dominstead of relying on the option being a specific shape.Implementation Approach
Testing Done
All existing tests work, which means the mounting is done properly.
Verification Steps
Additional Notes
Checklist
Related Issues