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

fix: add missing attributes in extension-link #4429

Merged
merged 1 commit into from Sep 14, 2023
Merged

fix: add missing attributes in extension-link #4429

merged 1 commit into from Sep 14, 2023

Conversation

Manueljlin
Copy link
Contributor

Despite rel and class already being defined as an attribute in addAttributes(), the interface was missing these two particular attributes so it wasn't accessible when using TypeScript without workarounds.

Please describe your changes / How did you accomplish your changes

I added the missing attributes to the interface

How have you tested your changes

Full disclosure, I haven't tested it yet. This is a quick PR that I made from GitHub's web editor so that I don't forget to test it later and submit a fix properly.

How can we verify your changes

Open a typescript file and try to add a link through

editor?.value?.chain().focus()?.extendMarkRange('link')
  .setLink({
    href: 'https://google.es',
    class: 'button' // this will give you an error without this PR
  })

Remarks

Checklist

  • The changes are not breaking the editor (untested)
  • Added tests where possible (not applicable)
  • Followed the guidelines (haven't read yet, sorry :(
  • Fixed linting issues (not applicable I think?)

Related issues

Despite `rel` and `class` already being defined as an attribute in `addAttributes()`, the interface was missing these two particular attributes so it wasn't accessible when using TypeScript without workarounds.
@netlify
Copy link

netlify bot commented Sep 8, 2023

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit b20e7b6
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/64fb0943de86320008477231
😎 Deploy Preview https://deploy-preview-4429--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 Sep 14, 2023
Copy link
Contributor

@bdbch bdbch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good find!

@bdbch bdbch changed the base branch from develop to main September 14, 2023 14:38
@bdbch bdbch dismissed their stale review September 14, 2023 14:38

The base branch was changed.

@bdbch bdbch changed the base branch from main to develop September 14, 2023 14:38
@bdbch bdbch merged commit 0578265 into ueberdosis:develop Sep 14, 2023
15 checks passed
bdbch pushed a commit that referenced this pull request Sep 14, 2023
Despite `rel` and `class` already being defined as an attribute in `addAttributes()`, the interface was missing these two particular attributes so it wasn't accessible when using TypeScript without workarounds.
benkroeger added a commit to benkroeger/tiptap that referenced this pull request Oct 10, 2023
* upstream/main: (399 commits)
  added new labels
  update links.yaml
  improve GitHub issue templates
  improve GitHub issue templates
  v2.1.11
  Revert "v2.2.11"
  v2.2.11
  feature(core): pass through paste event to pasteHandler `getAttributes` (ueberdosis#4354)
  v2.1.10
  Fix React and Vue NodeView renderers not adding correct selection classes  (ueberdosis#4452)
  v.2.1.9
  chore: dont generate changelogs for rc versions
  fix: add missing attributes in extension-link (ueberdosis#4429)
  docs(react): fix typo on React installation code block (ueberdosis#4441)
  v2.1.8
  v2.1.7
  prevent opening link when clicking on selection containing a link (ueberdosis#4346)
  docs: complete hard break shortcuts
  docs: complete hard break shortcuts
  docs(collaboration): fix typo in collaboration.md
  ...

Signed-off-by: Benjamin Kroeger <benjamin.kroeger@gmail.com>

# Conflicts:
#	packages/extension-link/src/helpers/clickHandler.ts
#	packages/extension-link/src/link.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants