feat: Link customization options (BLO-913)#2666
feat: Link customization options (BLO-913)#2666matthewlipski merged 2 commits intofeat/inline-tiptap-linkfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
| options.onClick(event); | ||
| return true; |
There was a problem hiding this comment.
Should we let the consumer decide the return value? i.e. undefined we interpret as true, but false we return false
There was a problem hiding this comment.
Yeah I think that makes sense
nperez0111
left a comment
There was a problem hiding this comment.
This looks right overall though!
* Added link customization options to editor * Updated `onClick` to optionally return a boolean
Summary
This PR adds a new editor option:
These do basically what they say -
HTMLAttributesadds HTML attributes to rendered link elements andonClickreplaces the default click behaviour (which opens the link in a new tab).Closes #1539
Rationale
Some users are finding it annoying that links open a new tab on click when they're just trying to move the selection.
HTML attributes allow for slight customization for link rendering. It's the best we can do atm, but really more of a stopgap solution as consumers should ideally be able to override the default link rendering with whatever they want.
Changes
See above.
Impact
N/A
Testing
N/A (example needed?)
Screenshots/Video
N/A
Checklist
Additional Notes
N/A