mirror of
https://github.com/codex-team/editor.js
synced 2026-03-15 15:15:47 +01:00
Merge 2a249bea0e into 530ec56bb8
This commit is contained in:
commit
b3fd6eae78
1 changed files with 4 additions and 9 deletions
|
|
@ -61,7 +61,7 @@ export default class BlockEvents extends Module {
|
|||
*
|
||||
* @todo probably using "beforeInput" event would be better here
|
||||
*/
|
||||
if (event.key === '/' && !event.ctrlKey && !event.metaKey) {
|
||||
if (event.code === 'Slash' && !event.ctrlKey && !event.metaKey) {
|
||||
this.slashPressed(event);
|
||||
}
|
||||
|
||||
|
|
@ -257,14 +257,9 @@ export default class BlockEvents extends Module {
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Toolbox will be opened with immediate focus on the Search input,
|
||||
* and '/' will be added in the search input by default — we need to prevent it and add '/' manually
|
||||
*/
|
||||
event.preventDefault();
|
||||
this.Editor.Caret.insertContentAtCaretPosition('/');
|
||||
|
||||
this.activateToolbox();
|
||||
setTimeout(() => {
|
||||
this.activateToolbox();
|
||||
}, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue