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

Exclude superscript from subscript, and vice versa. #1436

Merged

Conversation

BrianHung
Copy link
Contributor

No description provided.

@philippkuehn
Copy link
Contributor

ah yes. makes sense!

@philippkuehn philippkuehn merged commit 0fba863 into ueberdosis:main Jun 9, 2021
@hanspagel
Copy link
Contributor

Throws an error when the other isn’t loaded. #1438 😅

@philippkuehn
Copy link
Contributor

reverted. not sure about a workaround for now.

@umar-ahmed
Copy link

reverted. not sure about a workaround for now.

@philippkuehn Maybe add to the docs for both plugins that the user can extend the schema to make them mutually exclusive:

import Superscript from '@tiptap/extension-superscript'
import Subscript from '@tiptap/extension-subscript'

const CustomSuperscript = Superscript.extend({
  excludes: 'subscript',
})

const CustomSubscript = Subscript.extend({
  excludes: 'superscript',
})

That approach seems to make the least assumptions about the user's editor configuration

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.

4 participants