mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Pass content-type to codemirror mode option for syntax highlight
Fixes #605
This commit is contained in:
parent
711b76307c
commit
8b20143b1b
@ -58,7 +58,12 @@ EditTextWidget.prototype.postRender = function() {
|
||||
cm, config, cv, cm_opts = {
|
||||
lineWrapping: true,
|
||||
lineNumbers: true
|
||||
};
|
||||
},
|
||||
tid = $tw.wiki.getTiddler(this.editTitle);
|
||||
if(tid && tid.fields.type) {
|
||||
cm_opts.mode = tid.fields.type
|
||||
};
|
||||
|
||||
if($tw.browser && window.CodeMirror && this.editTag === "textarea") {
|
||||
if(EditTextWidget.configuration) {
|
||||
for (cv in EditTextWidget.configuration) { cm_opts[cv] = EditTextWidget.configuration[cv]; }
|
||||
|
Loading…
Reference in New Issue
Block a user