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

FEATURE: Add Ctrl+k keyboard shortcut handler #67

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

Conversation

gradinarufelix
Copy link
Contributor

Adds #62. The old link editor could be opened by pressing Ctrl+k. One of our customer's editors was missing that possibility.

I added another package with a keyboard shortcut handler, which follows the logic of the LinkButton.

Possible improvements could be to streamline and de-duplicate the code from LinkButton and the keyboard shortcut handler.

@gradinarufelix gradinarufelix force-pushed the feature-keyboard-shortcut branch 2 times, most recently from 9a7cf4d to 3bcf37f Compare July 24, 2024 09:53
}

const ckeditor5Configuration = ckeditor5Registry.get<SynchronousRegistry<any>>('config')
if (!ckeditor5Registry) {

Choose a reason for hiding this comment

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

This should be ckeditor5Configuration, or not?


ckeditor5Configuration.set('keystrokes', (ckEditorConfiguration: { plugins: ((ckEditorInstance: NeosEditor) => void)[]; }) => {
ckEditorConfiguration.plugins.push((ckEditorInstance) => {
ckEditorInstance.keystrokes.set('Ctrl+k', async (_: any, cancel: () => void) => {

Choose a reason for hiding this comment

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

Is it easily possible to make the shortcut configurable in a configuration file?

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.

2 participants