Skip to content
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

feat: add support for default link protocol #5022

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

henryStelle
Copy link

@henryStelle henryStelle commented Mar 31, 2024

Please describe your changes

Added the ability to specify a default protocol for the auto link features in the Link extension.

How did you accomplish your changes

Added a configurable defaultProtocol setting (the setting defaults to the previous default so there is no breaking change) that is then passed to linkifyjs to do its magic.

How have you tested your changes

Added 4 tests to the Link mark demo testing the positive and negative cases. I also confirmed these new tests fail without the added setting.

How can we verify your changes

Open up the Link demo and type example.com. The href of the generated link should be https://example.com and the default in this demo is https. Then, type in http://example.com and confirm the href is still http://example.com.

Remarks

Checklist

  • The changes are not breaking the editor
  • Added tests where possible
  • Followed the guidelines
  • Fixed linting issues

Related issues

#5007

Copy link

netlify bot commented Mar 31, 2024

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit 2f7fb8b
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/6614a81a50c3ce000859a9f5
😎 Deploy Preview https://deploy-preview-5022--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

bdbch
bdbch previously approved these changes Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready to Merge
Development

Successfully merging this pull request may close these issues.

None yet

3 participants