Focus on frontmatter in expert mode, fixes #134

This commit is contained in:
Flavio Copes
2015-09-03 13:21:13 +02:00
parent b3328a0205
commit aa6e3b3be3

View File

@@ -23,6 +23,9 @@
var editor = CodeMirror.fromTextArea(document.getElementById('frontmatter'), { var editor = CodeMirror.fromTextArea(document.getElementById('frontmatter'), {
mode: 'yaml', mode: 'yaml',
theme: 'paper', theme: 'paper',
{% if field.autofocus %}
autofocus: true,
{% endif %}
indentUnit: 4, indentUnit: 4,
indentWithTabs: false, indentWithTabs: false,
extraKeys: {Tab: function(cm) { cm.replaceSelection(" ", "end"); }} extraKeys: {Tab: function(cm) { cm.replaceSelection(" ", "end"); }}