|
@@ -114,6 +114,9 @@ export const scrollCenter = (vditor: IVditor) => {
|
|
|
|
|
|
export const hotkeyEvent = (vditor: IVditor, editorElement: HTMLElement) => {
|
|
|
editorElement.addEventListener("keydown", (event: KeyboardEvent & { target: HTMLElement }) => {
|
|
|
+ if (!event.isComposing && vditor.options.keydown) {
|
|
|
+ vditor.options.keydown(event);
|
|
|
+ }
|
|
|
// hint: 上下选择
|
|
|
if ((vditor.options.hint.extend.length > 1 || vditor.toolbar.elements.emoji) &&
|
|
|
vditor.hint.select(event, vditor)) {
|