mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-22 06:40:01 +08:00
Updated code system to dynamically set php codemirror mode
- Codemirror mode mapping value can now be a function to dynamically set mode depending on actual code content. - Used above system to set php mode type, depending on if '<?php' tags exist in content. Closes #1557
This commit is contained in:
@ -9,7 +9,7 @@ const methods = {
|
||||
this.$refs.overlay.components.overlay.hide();
|
||||
},
|
||||
updateEditorMode(language) {
|
||||
codeLib.setMode(this.editor, language);
|
||||
codeLib.setMode(this.editor, language, this.editor.getValue());
|
||||
},
|
||||
updateLanguage(lang) {
|
||||
this.language = lang;
|
||||
|
Reference in New Issue
Block a user