generated from Tinkoff/angular-open-source-starter
-
Notifications
You must be signed in to change notification settings - Fork 7
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
🐞 - hotkeys of disabled tools keep on working #1523
Labels
Comments
If you don't want some extensions, you can just provide your own set of editor extensions instead of the default ones:
import type {Extension, Mark, Node} from '@tiptap/core';
export const TUI_EDITOR_DEFAULT_EXTENSIONS: readonly (Extension | Mark | Node | Promise<Extension | Mark | Node>)[] = [
import('@tiptap/extension-blockquote').then(({default: blockquote}) => blockquote),
import('@tiptap/extension-bold').then(({default: bold}) => bold),
import('@tiptap/extension-bullet-list').then(({default: bulletList}) => bulletList),
import('@tiptap/extension-document').then(({default: document}) => document),
import('@tiptap/extension-hard-break').then(({default: hardBreak}) => hardBreak),
import('@tiptap/extension-history').then(({default: history}) => history.configure({
depth: 100,
newGroupDelay: 500
})),
import('@taiga-ui/editor/extensions/horizontal').then(({TuiHorizontalRule: horizontalRule}) => horizontalRule),
import('@tiptap/extension-italic').then(({default: italic}) => italic),
import('@tiptap/extension-list-item').then(({default: listItem}) => listItem),
import('@tiptap/extension-task-list').then(({default: taskList}) => taskList),
import('@tiptap/extension-task-item').then(({default: taskItem}) => taskItem.configure({
nested: true
})),
import('@tiptap/extension-ordered-list').then(({default: orderedList}) => orderedList),
import('@tiptap/extension-paragraph').then(({default: paragraph}) => paragraph),
import('@tiptap/extension-strike').then(({default: strike}) => strike),
import('@tiptap/extension-text').then(({default: text}) => text),
import('@tiptap/extension-text-style').then(({default: textStyle}) => textStyle),
import('@tiptap/extension-underline').then(({default: underline}) => underline),
import('@taiga-ui/editor/extensions/link').then(({TuiLink: link}) => link.configure({
HTMLAttributes: {
target: '_blank',
rel: 'noopener noreferrer nofollow'
}
}))
]; |
I think this issue is about adding this info to the docs, as people might think when you do not have a button in toolbar — hotkeys would also stop working, but these are actually two separate things. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproduction url
https://stackblitz.com/edit/angular-yiw4rr?file=src%2Fapp%2Fapp.component.ts
Description
Hotkeys of disabled tools keep on working.
Steps to reproduce:
cmd + b
/ctrl + b
Result: text gets bolder
Expected result: text does not change
Also works with other hotkeys:
cmd + u
,cmd + opt + 1/2/3
, etc.Taiga UI version
4.9.0
Browser Used
Chrome
OS Used
macOS
The text was updated successfully, but these errors were encountered: