Skip to content

feat: Link customization options#2666

Open
matthewlipski wants to merge 1 commit intofeat/inline-tiptap-linkfrom
link-options-new
Open

feat: Link customization options#2666
matthewlipski wants to merge 1 commit intofeat/inline-tiptap-linkfrom
link-options-new

Conversation

@matthewlipski
Copy link
Copy Markdown
Collaborator

Summary

This PR adds a new editor option:

links: Partial<{
  HTMLAttributes: Record<string, any>;
  onClick?: (event: MouseEvent) => void;
}>

These do basically what they say - HTMLAttributes adds HTML attributes to rendered link elements and onClick replaces 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

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Additional Notes

N/A

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blocknote Ready Ready Preview Apr 21, 2026 10:23am
blocknote-website Ready Ready Preview Apr 21, 2026 10:23am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 21, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ec5a04f6-83ca-4b83-9a80-df2272dc180c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch link-options-new

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 21, 2026

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@2666

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@2666

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@2666

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@2666

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@2666

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@2666

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@2666

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@2666

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@2666

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@2666

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@2666

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@2666

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@2666

commit: db2c4e6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant