@bhsd/codemirror-mediawiki 2.4.5 → 2.4.6
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 +16 -2
- package/dist/main.min.js +1 -1
- package/dist/mw.min.js +1 -1
- package/dist/mw.min.js.map +3 -3
- package/i18n/en.json +1 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/mw/README.md +134 -0
- package/mw/base.ts +1 -1
- package/mw/msg.ts +1 -1
- package/mw/openLinks.ts +14 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,20 +46,34 @@ This repository contains a modified version of the frontend scripts and styles f
|
|
|
46
46
|
|
|
47
47
|
Here is a [demo](https://bhsd-harry.github.io/codemirror-mediawiki).
|
|
48
48
|
|
|
49
|
+
Nonetheless, this repository also provides a customized version with additional functionality for use in a MediaWiki site. Browser editing tools such as [Wikiplus-highlight](https://github.com/bhsd-harry/Wikiplus-highlight) and an [InPageEdit plugin](https://github.com/inpageedit/Plugins) are built upon it. Please refer to a separate [README](./mw/README.md) file for the information.
|
|
50
|
+
|
|
49
51
|
# Usage
|
|
50
52
|
|
|
51
53
|
You can download the code via CDN, for example:
|
|
52
54
|
|
|
53
55
|
```js
|
|
54
56
|
// static import
|
|
55
|
-
import {CodeMirror6} from 'https://cdn.jsdelivr.net/npm/@bhsd/codemirror-mediawiki
|
|
57
|
+
import {CodeMirror6} from 'https://cdn.jsdelivr.net/npm/@bhsd/codemirror-mediawiki';
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
or
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
import {CodeMirror6} from 'https://unpkg.com/@bhsd/codemirror-mediawiki';
|
|
56
64
|
```
|
|
57
65
|
|
|
58
66
|
or
|
|
59
67
|
|
|
60
68
|
```js
|
|
61
69
|
// dynamic import
|
|
62
|
-
const {CodeMirror6} = await import('https://cdn.jsdelivr.net/npm/@bhsd/codemirror-mediawiki
|
|
70
|
+
const {CodeMirror6} = await import('https://cdn.jsdelivr.net/npm/@bhsd/codemirror-mediawiki');
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
or
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
const {CodeMirror6} = await import('https://unpkg.com/@bhsd/codemirror-mediawiki');
|
|
63
77
|
```
|
|
64
78
|
|
|
65
79
|
# Constructor
|