mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-14 09:16:05 +01:00
Focus on frontmatter in expert mode, fixes #134
This commit is contained in:
@@ -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"); }}
|
||||||
|
|||||||
Reference in New Issue
Block a user