diff --git a/edit/source-editor.js b/edit/source-editor.js index 1c31a0c5..4f6ee180 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -215,6 +215,7 @@ function createSourceEditor(style) { sourceCode: cm.getValue(), })) .then(replaceStyle) + .then(() => cm.setOption('mode', cm.doc.mode)) .catch(err => { if (err.message === t('styleMissingMeta', 'name')) { messageBox.confirm(t('usercssReplaceTemplateConfirmation')).then(ok => ok &&