lepture/editor

Do not autofocus textarea, or give option

Opened this issue · 3 comments

Currently codemirror is initialized with this code:

this.codemirror = CodeMirror.fromTextArea(el, {
    mode: 'markdown',
    theme: 'paper',
    tabSize: '2',
    indentWithTabs: true,
    lineNumbers: false,
    autofocus: true,
    extraKeys: keyMaps
});

Can we have the option to set autofocus to false, or have the default codemirror behavior?

Yeah, an outlet into the code mirror settings would be amazing!

Try to add an option for codemirror in the render method.

SimpleMDE, which is based on lepture's editor, includes the option to disable/enable autofocus, along with many other options.