fix(rich-text-link): Markdown pasting broken with conflicting linkOnPaste
option
#411
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
With the latest Tiptap version (#407), the Link extension came with a new built-in
linkOnPaste
option (default:true
), which conflicted with our own paste rules with support for Markdown syntax (in theRichTextLink
extension), and our ownPasteMarkdown
extension with full support for Markdown pasting.This PR simply forces
linkOnPaste
to befalse
, and disallows the option from being set totrue
in consumer apps. This is a workaround, as I believe thislinkOnPaste
option is not working as expected, and made an upstream comment about it here. If this is eventually fixed/improved in Tiptap, we can probably revert this change.Making this a
show
PR so that I can push a quick fix to Todoist and Twist (we already started receiving reports about this).PR Checklist
Test plan
Rich-text → Default
story[Doist](https://doist.dev)
Ctrl + Shift + V
(or the macOS equivalent)Demo