@bhsd/codemirror-mediawiki 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -8
- package/dist/main.min.js +1 -1
- package/dist/mw.min.js +28 -28
- package/dist/wiki.min.js +27 -27
- package/i18n/en.json +1 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -261,13 +261,15 @@ registerLanguage('python', python);
|
|
|
261
261
|
**param**: `boolean` whether to initialize immediately, default as true
|
|
262
262
|
|
|
263
263
|
```js
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
264
|
+
let cm;
|
|
265
|
+
cm = new CodeMirror6(textarea); // plain text
|
|
266
|
+
cm = new CodeMirror6(textarea, 'mediawiki', mwConfig);
|
|
267
|
+
cm = new CodeMirror6(textarea, 'html', mwConfig);
|
|
268
|
+
cm = new CodeMirror6(textarea, 'css');
|
|
269
|
+
cm = new CodeMirror6(textarea, 'javascript');
|
|
270
|
+
cm = new CodeMirror6(textarea, 'json');
|
|
271
|
+
cm = new CodeMirror6(textarea, 'lua');
|
|
272
|
+
cm = new CodeMirror6(textarea, 'vue');
|
|
271
273
|
```
|
|
272
274
|
|
|
273
275
|
</details>
|
|
@@ -585,11 +587,12 @@ Set the language mode.
|
|
|
585
587
|
|
|
586
588
|
```js
|
|
587
589
|
cm.setLanguage('mediawiki', mwConfig);
|
|
588
|
-
cm.setLanguage('html', mwConfig);
|
|
590
|
+
cm.setLanguage('html', mwConfig);
|
|
589
591
|
cm.setLanguage('css');
|
|
590
592
|
cm.setLanguage('javascript');
|
|
591
593
|
cm.setLanguage('json');
|
|
592
594
|
cm.setLanguage('lua');
|
|
595
|
+
cm.setLanguage('vue');
|
|
593
596
|
```
|
|
594
597
|
|
|
595
598
|
</details>
|