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

Display correct shortcut for Strikethrough, depending on extension version #314

Conversation

sjdemartini
Copy link
Owner

This ensures the correct mod+Shift+S shortcut is displayed by default (used in newer versions of the strike extension package), but uses mod+Shift+X if the extension is configured to use that shortcut, for users still on Tiptap <2.1.0 (for backwards compatibility).

Alternative to the PR that just changes to mod+Shift+S by default #305, and would require users of Tiptap <2.1.0 to pass <MenuButtonStrikethrough tooltipShortcutKeys={["mod", "Shift", "X"]} />.

…rsion

This ensures the correct mod+Shift+S shortcut is displayed by default
(used in newer versions of the strike extension package), but uses
mod+Shift+X if the extension is configured to use that shortcut, for
users still on Tiptap <2.1.0 (for backwards compatibility).
@sjdemartini
Copy link
Owner Author

Opened this PR for reference later, should this pattern be useful in other places, but I think given how long mod+Shift+S has been around (Tiptap is now on v2.10, and this shortcut was changed back in 2.1), it's better to avoid the complexity and overhead of checking what extension was configured, and instead just go with the simpler approach in #305 which always uses mod+Shift+S (and can be overridden by users of mui-tiptap like <MenuButtonStrikethrough tooltipShortcutKeys={["mod", "Shift", "X"]} />).

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