]> BookStack Code Mirror - bookstack/blobdiff - resources/js/services/code.js
Fixes padding issues of the sidebar's items
[bookstack] / resources / js / services / code.js
index a7dfa587f203dcea41b2c781c36887e0d6b28d82..361ccc3f18224108283ad7d67772817c46bb2a26 100644 (file)
@@ -26,6 +26,8 @@ import 'codemirror/mode/rust/rust';
 import 'codemirror/mode/shell/shell';
 import 'codemirror/mode/sql/sql';
 import 'codemirror/mode/toml/toml';
+import 'codemirror/mode/vb/vb';
+import 'codemirror/mode/vbscript/vbscript';
 import 'codemirror/mode/xml/xml';
 import 'codemirror/mode/yaml/yaml';
 
@@ -84,6 +86,10 @@ const modeMap = {
     bash: 'shell',
     toml: 'toml',
     sql: 'text/x-sql',
+    vbs: 'vbscript',
+    vbscript: 'vbscript',
+    'vb.net': 'text/x-vb',
+    vbnet: 'text/x-vb',
     xml: 'xml',
     yaml: 'yaml',
     yml: 'yaml',
@@ -235,9 +241,7 @@ function wysiwygView(elem) {
         theme: getTheme(),
         readOnly: true
     });
-    setTimeout(() => {
-        cm.refresh();
-    }, 300);
+
     return {wrap: newWrap, editor: cm};
 }