1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Shortcut ‘Ctrl-+’ not working in CodeMirror

Discussão em 'Angular' iniciado por Oleg Zinchenko, Junho 30, 2025.

  1. Why shortcut ‘Ctrl-+’ not working in CodeMirror ?

    import { CodemirrorComponent } from 'ng2-codemirror';
    ...
    @ViewChild('novelEditor') private novelEditor: CodemirrorComponent;
    ...
    const cm = this.novelEditor.instance;
    const codeMirrorHotKeyMap = this.editorService.getCodeMirrorHotKeyMap(this.novelEditor);
    cm.addKeyMap(codeMirrorHotKeyMap, false);
    ...
    getCodeMirrorHotKeyMap(codeMirror: CodemirrorComponent) {
    return {
    'Ctrl-+': () => console.log('ctrl +'), // not working
    'Ctrl--': () => console.log('ctrl -')
    }
    }


    ‘Ctrl–’, ‘Ctrl-*’, ‘Ctrl-/’,‘Ctrl-.’,‘Ctrl-0’ - working all, but only ‘Ctrl-+’ not working.

    Continue reading...

Compartilhe esta Página