差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
javascript:codemirror [2023/04/09 09:27] – [動作確認] ともやん | javascript:codemirror [2025/04/17 13:47] (現在) – [ビルドツールを使わない方法] ともやん | ||
---|---|---|---|
行 3: | 行 3: | ||
ソースコード: | ソースコード: | ||
- | ===== CodeMirror 6 ===== | + | ====== CodeMirror 6 ====== |
本家: [[https:// | 本家: [[https:// | ||
ソースコード: | ソースコード: | ||
ドキュメント: | ドキュメント: | ||
+ | |||
+ | ===== ビルドツールを使わない方法 ===== | ||
+ | < | ||
+ | |||
+ | <div id=" | ||
+ | <script type=" | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | <script type=" | ||
+ | import { javascript } from ' | ||
+ | import { basicSetup } from ' | ||
+ | import { EditorView, keymap } from ' | ||
+ | import { defaultKeymap } from ' | ||
+ | //import { solarizedDark } from ' | ||
+ | import { monokai } from ' | ||
+ | |||
+ | let myView = new EditorView({ | ||
+ | doc: `<div id=" | ||
+ | |||
+ | <script type=" | ||
+ | import { javascript } from ' | ||
+ | import { basicSetup } from ' | ||
+ | import { EditorView, keymap } from ' | ||
+ | import { defaultKeymap } from ' | ||
+ | //import { solarizedDark } from ' | ||
+ | import { monokai } from ' | ||
+ | |||
+ | let myView = new EditorView({ | ||
+ | doc: ' | ||
+ | extensions: [keymap.of(defaultKeymap)], | ||
+ | parent: document.getElementById(" | ||
+ | extensions: [ | ||
+ | basicSetup, | ||
+ | javascript({typescript: | ||
+ | monokai, | ||
+ | EditorView.theme({ | ||
+ | ' | ||
+ | fontFamily: ' | ||
+ | } | ||
+ | }) | ||
+ | ], | ||
+ | }) | ||
+ | </ | ||
+ | extensions: [keymap.of(defaultKeymap)], | ||
+ | parent: document.getElementById(" | ||
+ | extensions: [ | ||
+ | basicSetup, | ||
+ | javascript({typescript: | ||
+ | monokai, | ||
+ | EditorView.theme({ | ||
+ | ' | ||
+ | fontFamily: ' | ||
+ | } | ||
+ | }) | ||
+ | ], | ||
+ | }) | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== CodeMirirter 6 のテーマ...🤔 ===== | ||
+ | [[git> | ||
+ | [[git> | ||
+ | |||
+ | ===== CodeMirror 6 開発版(dev)のインストール方法 ===== | ||
==== Node.js のインストール ==== | ==== Node.js のインストール ==== | ||
詳しくは [[linux: | 詳しくは [[linux: | ||
- | ==== CodeMirror 6 のダウンロード ==== | + | ==== CodeMirror 6 開発版ダウンロード ==== |
[[https:// | [[https:// | ||
[[git> | [[git> | ||
<WRAP color_term> | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | <b class=GRN> | + | <font color="# |
</ | </ | ||
<WRAP color_result>< | <WRAP color_result>< | ||
- | Cloning into ' | + | Cloning into & |
remote: Enumerating objects: 25, done. | remote: Enumerating objects: 25, done. | ||
remote: Counting objects: 100% (25/25), done. | remote: Counting objects: 100% (25/25), done. | ||
remote: Compressing objects: 100% (20/20), done. | remote: Compressing objects: 100% (20/20), done. | ||
- | remote: Total 25 (delta 0), reused | + | remote: Total 25 (delta 0), reused |
- | Receiving objects: 100% (25/25), 11.47 KiB | 690.00 KiB/s, done. | + | Receiving objects: 100% (25/25), 11.13 KiB | 178.00 KiB/s, done. |
</ | </ | ||
</ | </ | ||
- | ==== cm.js でインストール | + | ==== cm.js の使用方法 |
<WRAP color_term> | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | <b class=GRN> | + | <font color="# |
- | <b class=GRN>$</b> <b class=HIY>node</b> bin/cm.js install | + | |
</ | </ | ||
- | < | + | < |
- | Cloning into '/ | + | Usage: |
- | remote: Enumerating objects: 3052, done. | + | cm install [--ssh] |
- | remote: Counting objects: 100% (210/210), done. | + | cm packages |
- | remote: Compressing objects: 100% (114/114), done. | + | cm status |
- | remote: Total 3052 (delta 142), reused 152 (delta 94), pack-reused 2842 | + | cm build Build the bundle files |
- | Receiving objects: 100% (3052/3052), 592.42 KiB | 1.13 MiB/s, done. | + | cm clean Delete files created by the build |
- | Resolving deltas: 100% (1590/ | + | cm devserver [--source-map] |
- | Cloning into '/ | + | Start a dev server on port 8090 |
- | remote: Enumerating objects: 8830, done. | + | cm release & |
- | remote: Counting objects: 100% (1845/ | + | Create commits to tag a release |
- | remote: Compressing objects: 100% (345/345), done. | + | cm build-readme & |
- | remote: Total 8830 (delta 1547), reused 1785 (delta 1498), pack-reused 6985 | + | cm commit & |
- | Receiving objects: 100% (8830/ | + | cm push Run git push in packages that have new commits |
- | Resolving deltas: 100% (6009/ | + | cm run & |
- | Cloning into '/ | + | cm test [--no-browser] |
- | remote: Enumerating objects: 1687, done. | + | cm grep & |
- | remote: Counting objects: 100% (280/280), done. | + | |
- | remote: Compressing objects: 100% (102/102), done. | + | </pre></html>< |
- | remote: Total 1687 (delta 192), reused 259 (delta 176), pack-reused 1407 | + | </WRAP> |
- | Receiving objects: 100% (1687/1687), 286.54 KiB | 908.00 KiB/s, done. | + | |
- | Resolving deltas: 100% (777/777), done. | + | ==== cm.js で開発環境をインストール ==== |
- | Cloning into '/home/ | + | <WRAP color_term> |
- | remote: Enumerating objects: 1846, done. | + | <WRAP color_command>< |
- | remote: Counting objects: 100% (358/358), done. | + | <font color="# |
- | remote: Compressing objects: 100% (91/91), done. | + | <font color="# |
- | remote: Total 1846 (delta 302), reused 316 (delta 265), pack-reused 1488 | + | </pre></html>< |
- | Receiving objects: 100% (1846/1846), 327.85 KiB | 703.00 KiB/s, done. | + | <WRAP color_result_hlong>< |
- | Resolving deltas: 100% (1027/1027), done. | + | Cloning into '/ |
- | Cloning into '/home/tomoyan/my_projects/ | + | remote: Enumerating objects: |
- | remote: Enumerating objects: 948, done. | + | remote: Counting objects: 100% (391/391), done. |
- | remote: Counting objects: 100% (359/359), done. | + | remote: Compressing objects: 100% (177/177), done. |
- | remote: Compressing objects: 100% (76/76), done. | + | remote: Total 3233 (delta |
- | remote: Total 948 (delta 297), reused 337 (delta 281), pack-reused 589 | + | Receiving objects: 100% (3233/3233), 667.32 KiB | 854.00 KiB/s, done. |
- | Receiving objects: 100% (948/948), 157.48 KiB | 844.00 KiB/s, done. | + | Resolving deltas: 100% (1708/1708), done. |
- | Resolving deltas: 100% (532/532), done. | + | Cloning into '/ |
- | Cloning into '/ | + | remote: Enumerating objects: |
- | remote: Enumerating objects: | + | remote: Counting objects: 100% (1705/1705), done. |
- | remote: Counting objects: 100% (321/321), done. | + | remote: Compressing objects: 100% (208/208), done. |
- | remote: Compressing objects: 100% (120/120), done. | + | remote: Total 10600 (delta |
- | remote: Total 1547 (delta | + | Receiving objects: 100% (10600/10600), 2.36 MiB | 1.53 MiB/s, done. |
- | Receiving objects: 100% (1547/1547), 269.77 KiB | 1000.00 KiB/s, done. | + | Resolving deltas: 100% (7243/7243), done. |
- | Resolving deltas: 100% (812/812), done. | + | Cloning into '/ |
- | Cloning into '/ | + | remote: Enumerating objects: |
- | remote: Enumerating objects: | + | remote: Counting objects: 100% (477/477), done. |
- | remote: Counting objects: 100% (274/274), done. | + | remote: Compressing objects: 100% (197/197), done. |
- | remote: Compressing objects: 100% (79/79), done. | + | remote: Total 1884 (delta |
- | remote: Total 652 (delta | + | Receiving objects: 100% (1884/1884), 324.28 KiB | 752.00 KiB/s, done. |
- | Receiving objects: 100% (652/652), 100.94 KiB | 1.01 MiB/s, done. | + | Resolving deltas: 100% (909/909), done. |
- | Resolving deltas: 100% (267/267), done. | + | Cloning into '/ |
- | Cloning into '/ | + | remote: Enumerating objects: |
- | remote: Enumerating objects: | + | remote: Counting objects: 100% (585/585), done. |
- | remote: Counting objects: 100% (258/258), done. | + | remote: Compressing objects: 100% (190/190), done. |
- | remote: Compressing objects: 100% (139/139), done. | + | remote: Total 2073 (delta |
- | remote: Total 258 (delta | + | Receiving objects: 100% (2073/2073), 383.99 KiB | 546.00 KiB/s, done. |
- | Receiving objects: 100% (258/258), 39.35 KiB | 760.00 KiB/s, done. | + | Resolving deltas: 100% (1172/1172), done. |
- | Resolving deltas: 100% (109/109), done. | + | Cloning into '/ |
- | Cloning into '/ | + | remote: Enumerating objects: |
- | remote: Enumerating objects: | + | remote: Counting objects: 100% (405/405), done. |
- | remote: Counting objects: 100% (147/147), done. | + | remote: Compressing objects: 100% (87/87), done. |
- | remote: Compressing objects: 100% (90/90), done. | + | remote: Total 1103 (delta |
- | remote: Total 147 (delta | + | Receiving objects: 100% (1103/1103), 178.82 KiB | 963.00 KiB/s, done. |
- | Receiving objects: 100% (147/147), 21.65 KiB | 791.00 KiB/s, done. | + | Resolving deltas: 100% (640/640), done. |
- | Resolving deltas: 100% (74/74), done. | + | Cloning into '/ |
- | Cloning into '/ | + | remote: Enumerating objects: |
- | remote: Enumerating objects: | + | remote: Counting objects: 100% (521/521), done. |
- | remote: Counting objects: 100% (64/64), done. | + | remote: Compressing objects: 100% (81/81), done. |
- | remote: Compressing objects: 100% (27/27), done. | + | remote: Total 2000 (delta |
- | remote: Total 266 (delta | + | Receiving objects: 100% (2000/2000), 322.62 KiB | 658.00 KiB/s, done. |
- | Receiving objects: 100% (266/266), 32.67 KiB | 727.00 KiB/s, done. | + | Resolving deltas: 100% (1142/1142), done. |
- | Resolving deltas: 100% (121/121), done. | + | Cloning into '/ |
- | Cloning into '/ | + | remote: Enumerating objects: |
- | remote: Enumerating objects: | + | remote: Counting objects: 100% (243/243), done. |
- | remote: Counting objects: 100% (162/162), done. | + | remote: Compressing objects: 100% (24/24), done. |
- | remote: Compressing objects: 100% (99/99), done. | + | remote: Total 827 (delta |
- | remote: Total 679 (delta | + | Receiving objects: 100% (827/827), 122.12 KiB | 886.00 KiB/s, done. |
- | Receiving objects: 100% (679/679), 104.03 KiB | 1.11 MiB/s, done. | + | Resolving deltas: 100% (367/367), done. |
- | Resolving deltas: 100% (322/322), done. | + | Cloning into '/ |
- | Cloning into '/ | + | remote: Enumerating objects: |
- | remote: Enumerating objects: 206, done. | + | remote: Counting objects: 100% (74/74), done. |
- | remote: Counting objects: 100% (206/206), done. | + | remote: Compressing objects: 100% (24/24), done. |
- | remote: Compressing objects: 100% (134/134), done. | + | remote: Total 286 (delta |
- | remote: Total 206 (delta 92), reused 168 (delta 54), pack-reused 0 | + | Receiving objects: 100% (286/286), 48.23 KiB | 433.00 KiB/s, done. |
- | Receiving objects: 100% (206/206), 25.69 KiB | 1.22 MiB/s, done. | + | Resolving deltas: 100% (120/120), done. |
- | Resolving deltas: 100% (92/92), done. | + | Cloning into '/ |
- | Cloning into '/ | + | remote: Enumerating objects: |
- | remote: Enumerating objects: | + | remote: Counting objects: 100% (84/84), done. |
- | remote: Counting objects: 100% (209/209), done. | + | remote: Compressing objects: 100% (48/48), done. |
- | remote: Compressing objects: 100% (146/146), done. | + | remote: Total 244 (delta |
- | remote: Total 209 (delta | + | Receiving objects: 100% (244/244), 39.12 KiB | 513.00 KiB/s, done. |
- | Receiving objects: 100% (209/209), 25.48 KiB | 1.02 MiB/s, done. | + | Resolving deltas: 100% (126/126), done. |
- | Resolving deltas: 100% (91/91), done. | + | Cloning into '/ |
- | Cloning into '/ | + | remote: Enumerating objects: |
- | remote: Enumerating objects: 197, done. | + | remote: Counting objects: 100% (70/70), done. |
- | remote: Counting objects: 100% (197/197), done. | + | remote: Compressing objects: 100% (26/26), done. |
- | remote: Compressing objects: 100% (128/128), done. | + | remote: Total 272 (delta |
- | remote: Total 197 (delta 89), reused 160 (delta 52), pack-reused 0 | + | Receiving objects: 100% (272/272), 33.65 KiB | 499.00 KiB/s, done. |
- | Receiving objects: 100% (197/197), 25.17 KiB | 696.00 KiB/s, done. | + | Resolving deltas: 100% (124/124), done. |
- | Resolving deltas: 100% (89/89), done. | + | Cloning into '/ |
- | Cloning into '/ | + | remote: Enumerating objects: |
- | remote: Enumerating objects: | + | remote: Counting objects: 100% (126/126), done. |
- | remote: Counting objects: 100% (113/113), done. | + | remote: Compressing objects: 100% (32/32), done. |
- | remote: Compressing objects: 100% (82/82), done. | + | remote: Total 798 (delta |
- | remote: Total 113 (delta | + | Receiving objects: 100% (798/798), 119.63 KiB | 700.00 KiB/s, done. |
- | Receiving objects: 100% (113/113), 16.73 KiB | 685.00 KiB/s, done. | + | Resolving deltas: 100% (405/405), done. |
- | Resolving deltas: 100% (54/54), done. | + | Cloning into '/ |
- | Cloning into '/ | + | |
- | remote: Enumerating objects: | + | |
- | remote: Counting objects: 100% (116/116), done. | + | |
- | remote: Compressing objects: 100% (74/74), done. | + | |
- | remote: Total 348 (delta | + | |
- | Receiving objects: 100% (348/348), 51.14 KiB | 952.00 KiB/s, done. | + | |
- | Resolving deltas: 100% (155/155), done. | + | |
- | Cloning into '/ | + | |
- | remote: Enumerating objects: | + | |
- | remote: Counting objects: 100% (328/328), done. | + | |
- | remote: Compressing objects: 100% (218/218), done. | + | |
- | remote: Total 328 (delta | + | |
- | Receiving objects: 100% (328/328), 45.26 KiB | 759.00 KiB/s, done. | + | |
- | Resolving deltas: 100% (147/147), done. | + | |
- | Cloning into '/ | + | |
- | remote: Enumerating objects: | + | |
- | remote: Counting objects: 100% (171/171), done. | + | |
- | remote: Compressing objects: 100% (103/103), done. | + | |
- | remote: Total 585 (delta | + | |
- | Receiving objects: 100% (585/585), 97.80 KiB | 776.00 KiB/s, done. | + | |
- | Resolving deltas: 100% (267/267), done. | + | |
- | Cloning into '/ | + | |
- | remote: Enumerating objects: 432, done. | + | |
- | remote: Counting objects: 100% (172/172), done. | + | |
- | remote: Compressing objects: 100% (51/51), done. | + | |
- | remote: Total 432 (delta 147), reused 135 (delta 121), pack-reused 260 | + | |
- | Receiving objects: 100% (432/432), 79.12 KiB | 861.00 KiB/s, done. | + | |
- | Resolving deltas: 100% (245/245), done. | + | |
- | Cloning into '/ | + | |
remote: Enumerating objects: 214, done. | remote: Enumerating objects: 214, done. | ||
remote: Counting objects: 100% (214/214), done. | remote: Counting objects: 100% (214/214), done. | ||
- | remote: Compressing objects: 100% (139/139), done. | + | remote: Compressing objects: 100% (140/140), done. |
- | remote: Total 214 (delta 97), reused | + | remote: Total 214 (delta 97), reused |
- | Receiving objects: 100% (214/214), 26.15 KiB | 723.00 KiB/s, done. | + | Receiving objects: 100% (214/214), 26.78 KiB | 1.22 MiB/s, done. |
Resolving deltas: 100% (97/97), done. | Resolving deltas: 100% (97/97), done. | ||
- | Cloning into '/ | + | Cloning into '/ |
- | remote: Enumerating objects: | + | remote: Enumerating objects: |
- | remote: Counting objects: 100% (274/274), done. | + | remote: Counting objects: 100% (6/6), done. |
- | remote: Compressing objects: 100% (183/183), done. | + | remote: Compressing objects: 100% (6/6), done. |
- | remote: Total 274 (delta | + | remote: Total 217 (delta |
- | Receiving objects: 100% (274/274), 37.93 KiB | 636.00 KiB/s, done. | + | Receiving objects: 100% (217/217), 26.87 KiB | 387.00 KiB/s, done. |
- | Resolving deltas: 100% (129/129), done. | + | Resolving deltas: 100% (94/94), done. |
- | Cloning into '/ | + | Cloning into '/ |
- | remote: Enumerating objects: 560, done. | + | remote: Enumerating objects: |
- | remote: Counting objects: 100% (152/152), done. | + | remote: Counting objects: 100% (205/205), done. |
- | remote: Compressing objects: 100% (81/81), done. | + | remote: Compressing objects: 100% (134/134), done. |
- | remote: Total 560 (delta 102), reused 107 (delta 66), pack-reused 408 | + | remote: Total 205 (delta |
- | Receiving objects: 100% (560/560), 126.84 KiB | 354.00 KiB/s, done. | + | Receiving objects: 100% (205/205), 26.47 KiB | 3.31 MiB/s, done. |
- | Resolving deltas: 100% (279/279), done. | + | Resolving deltas: 100% (93/93), done. |
- | Cloning into '/ | + | Cloning into '/ |
- | remote: Enumerating objects: | + | remote: Enumerating objects: |
- | remote: Counting objects: 100% (111/111), done. | + | remote: Counting objects: 100% (121/121), done. |
- | remote: Compressing objects: 100% (78/78), done. | + | remote: Compressing objects: 100% (88/88), done. |
- | remote: Total 111 (delta | + | remote: Total 121 (delta |
- | Receiving objects: 100% (111/111), 13.68 KiB | 609.00 KiB/s, done. | + | Receiving objects: 100% (121/121), 17.78 KiB | 1.97 MiB/s, done. |
- | Resolving deltas: 100% (54/54), done. | + | Resolving deltas: 100% (59/59), done. |
- | Cloning into '/ | + | Cloning into '/ |
- | remote: Enumerating objects: | + | remote: Enumerating objects: |
- | remote: Counting objects: 100% (65/65), done. | + | remote: Counting objects: 100% (69/69), done. |
- | remote: Compressing objects: 100% (41/41), done. | + | |
- | remote: Total 65 (delta | + | |
- | Receiving objects: 100% (65/65), 8.69 KiB | 2.90 MiB/s, done. | + | |
- | Resolving deltas: 100% (30/30), done. | + | |
- | Cloning into '/ | + | |
- | remote: Enumerating objects: | + | |
- | remote: Counting objects: 100% (30/30), done. | + | |
remote: Compressing objects: 100% (23/23), done. | remote: Compressing objects: 100% (23/23), done. | ||
- | remote: Total 30 (delta | + | remote: Total 410 (delta |
- | Receiving objects: 100% (30/ | + | Receiving |
- | Resolving deltas: 100% (10/10), done. | + | Resolving deltas: 100% (196/196), done. |
- | Cloning into '/ | + | Cloning into & |
- | remote: Enumerating objects: | + | remote: Enumerating objects: 48, done. |
- | remote: Counting objects: 100% (51/51), done. | + | remote: Counting objects: 100% (48/48), done. |
- | remote: Compressing objects: 100% (33/33), done. | + | remote: Compressing |
- | remote: Total 51 (delta | + | remote: Total 48 (delta 18), reused 45 (delta 15), pack-reused 0 (from 0) |
- | Receiving objects: 100% (51/51), 9.15 KiB | 2.29 MiB/s, done. | + | Receiving objects: 100% (48/48), 11.76 KiB | 1.07 MiB/s, done. |
- | Resolving deltas: 100% (20/20), done. | + | Resolving deltas: 100% (18/18), done. |
- | Cloning into '/ | + | Cloning into '/ |
- | remote: Enumerating objects: | + | remote: Enumerating objects: |
- | remote: Counting objects: 100% (260/260), done. | + | remote: Counting objects: 100% (38/38), done. |
- | remote: Compressing objects: 100% (175/175), done. | + | remote: Compressing objects: 100% (29/29), done. |
- | remote: Total 1193 (delta | + | remote: Total 381 (delta |
- | Receiving objects: 100% (1193/1193), 658.08 KiB | 1.44 MiB/s, done. | + | Receiving objects: 100% (381/381), 58.98 KiB | 384.00 KiB/s, done. |
- | Resolving deltas: 100% (669/669), done. | + | Resolving deltas: 100% (172/172), done. |
- | Cloning into '/ | + | Cloning into '/ |
- | remote: Enumerating objects: | + | remote: Enumerating objects: |
- | remote: Counting objects: 100% (49/49), done. | + | remote: Counting objects: 100% (52/52), done. |
- | remote: Compressing objects: 100% (37/37), done. | + | remote: Compressing objects: 100% (38/38), done. |
- | remote: Total 284 (delta | + | remote: Total 52 (delta |
- | Receiving objects: 100% (284/284), 37.06 KiB | 403.00 KiB/s, done. | + | Receiving objects: 100% (52/52), 8.46 KiB | 4.23 MiB/s, done. |
- | Resolving deltas: 100% (122/122), done. | + | Resolving deltas: 100% (22/22), done. |
- | Cloning into '/ | + | Cloning into '/ |
- | remote: Enumerating objects: | + | remote: Enumerating objects: |
- | remote: Counting objects: 100% (216/216), done. | + | remote: Counting objects: 100% (107/107), done. |
+ | remote: Compressing objects: 100% (49/49), done. | ||
+ | remote: Total 672 (delta | ||
+ | Receiving objects: 100% (672/672), 110.35 KiB | 653.00 KiB/s, done. | ||
+ | Resolving deltas: 100% (326/326), done. | ||
+ | Cloning into '/ | ||
+ | remote: Enumerating objects: | ||
+ | remote: Counting objects: 100% (349/349), done. | ||
remote: Compressing objects: 100% (104/104), done. | remote: Compressing objects: 100% (104/104), done. | ||
- | remote: Total 216 (delta | + | remote: Total 653 (delta |
- | Receiving objects: 100% (216/216), 49.39 KiB | 887.00 KiB/s, done. | + | Receiving objects: 100% (653/653), 124.65 KiB | 622.00 KiB/s, done. |
- | Resolving deltas: 100% (130/130), done. | + | Resolving deltas: 100% (391/391), done. |
+ | Cloning into & | ||
+ | remote: Enumerating objects: 222, done. | ||
+ | remote: Counting objects: 100% (222/222), done. | ||
+ | remote: Compressing objects: 100% (145/145), done. | ||
+ | remote: Total 222 (delta 102), reused 179 (delta 59), pack-reused 0 (from 0) | ||
+ | Receiving objects: 100% (222/222), 27.25 KiB | 715.00 KiB/s, done. | ||
+ | Resolving deltas: 100% (102/102), done. | ||
+ | Cloning into & | ||
+ | remote: Enumerating objects: 294, done. | ||
+ | remote: Counting objects: 100% (294/294), done. | ||
+ | remote: Compressing objects: 100% (196/196), done. | ||
+ | remote: Total 294 (delta 141), reused 241 (delta 88), pack-reused 0 (from 0) | ||
+ | Receiving objects: 100% (294/294), 41.88 KiB | 536.00 KiB/s, done. | ||
+ | Resolving deltas: 100% (141/141), done. | ||
+ | Cloning into & | ||
+ | remote: Enumerating objects: 681, done. | ||
+ | remote: Counting objects: 100% (273/273), done. | ||
+ | remote: Compressing objects: 100% (123/123), done. | ||
+ | remote: Total 681 (delta 174), reused 236 (delta 140), pack-reused 408 (from 1) | ||
+ | Receiving objects: 100% (681/681), 146.91 KiB | 680.00 KiB/s, done. | ||
+ | Resolving deltas: 100% (351/351), done. | ||
+ | Cloning into & | ||
+ | remote: Enumerating objects: 119, done. | ||
+ | remote: Counting objects: 100% (119/119), done. | ||
+ | remote: Compressing objects: 100% (84/84), done. | ||
+ | remote: Total 119 (delta 59), reused 91 (delta 31), pack-reused 0 (from 0) | ||
+ | Receiving objects: 100% (119/119), 14.77 KiB | 3.69 MiB/s, done. | ||
+ | Resolving deltas: 100% (59/59), done. | ||
+ | Cloning into & | ||
+ | remote: Enumerating objects: 83, done. | ||
+ | remote: Counting objects: 100% (83/83), done. | ||
+ | remote: Compressing objects: 100% (52/52), done. | ||
+ | remote: Total 83 (delta 42), reused 68 (delta 27), pack-reused 0 (from 0) | ||
+ | Receiving objects: 100% (83/83), 10.82 KiB | 5.41 MiB/s, done. | ||
+ | Resolving deltas: 100% (42/42), done. | ||
+ | Cloning into & | ||
+ | remote: Enumerating objects: 66, done. | ||
+ | remote: Counting objects: 100% (66/66), done. | ||
+ | remote: Compressing objects: 100% (45/45), done. | ||
+ | remote: Total 66 (delta 33), reused 53 (delta 21), pack-reused 0 (from 0) | ||
+ | Receiving objects: 100% (66/66), 11.62 KiB | 1.06 MiB/s, done. | ||
+ | Resolving deltas: 100% (33/33), done. | ||
+ | Cloning into & | ||
+ | remote: Enumerating objects: 85, done. | ||
+ | remote: Counting objects: 100% (85/85), done. | ||
+ | remote: Compressing objects: 100% (56/56), done. | ||
+ | remote: Total 85 (delta 41), reused 73 (delta 29), pack-reused 0 (from 0) | ||
+ | Receiving objects: 100% (85/85), 14.36 KiB | 1.60 MiB/s, done. | ||
+ | Resolving deltas: 100% (41/41), done. | ||
+ | Cloning into & | ||
+ | remote: Enumerating objects: 114, done. | ||
+ | remote: Counting objects: 100% (114/114), done. | ||
+ | remote: Compressing objects: 100% (76/76), done. | ||
+ | remote: Total 114 (delta 64), reused 85 (delta 36), pack-reused 0 (from 0) | ||
+ | Receiving objects: 100% (114/114), 23.78 KiB | 2.38 MiB/s, done. | ||
+ | Resolving deltas: 100% (64/64), done. | ||
+ | Cloning into & | ||
+ | remote: Enumerating objects: 76, done. | ||
+ | remote: Counting objects: 100% (76/76), done. | ||
+ | remote: Compressing objects: 100% (39/39), done. | ||
+ | remote: Total 76 (delta 38), reused 70 (delta 32), pack-reused 0 (from 0) | ||
+ | Receiving objects: 100% (76/76), 14.37 KiB | 7.18 MiB/s, done. | ||
+ | Resolving deltas: 100% (38/38), done. | ||
+ | Cloning into & | ||
+ | remote: Enumerating objects: 68, done. | ||
+ | remote: Counting objects: 100% (68/68), done. | ||
+ | remote: Compressing objects: 100% (43/43), done. | ||
+ | remote: Total 68 (delta 33), reused 57 (delta 23), pack-reused 0 (from 0) | ||
+ | Receiving objects: 100% (68/68), 11.73 KiB | 5.86 MiB/s, done. | ||
+ | Resolving deltas: 100% (33/33), done. | ||
+ | Cloning into & | ||
+ | remote: Enumerating objects: 1304, done. | ||
+ | remote: Counting objects: 100% (371/371), done. | ||
+ | remote: Compressing objects: 100% (205/205), done. | ||
+ | remote: Total 1304 (delta 201), reused 323 (delta 164), pack-reused 933 (from 1) | ||
+ | Receiving objects: 100% (1304/ | ||
+ | Resolving deltas: 100% (751/751), done. | ||
+ | Cloning into & | ||
+ | remote: Enumerating objects: 304, done. | ||
+ | remote: Counting objects: 100% (69/69), done. | ||
+ | remote: Compressing objects: 100% (51/51), done. | ||
+ | remote: Total 304 (delta 32), reused 50 (delta 16), pack-reused 235 (from 1) | ||
+ | Receiving objects: 100% (304/304), 39.37 KiB | 485.00 KiB/s, done. | ||
+ | Resolving deltas: 100% (133/133), done. | ||
+ | Cloning into & | ||
+ | remote: Enumerating objects: 647, done. | ||
+ | remote: Counting objects: 100% (274/274), done. | ||
+ | remote: Compressing objects: 100% (137/137), done. | ||
+ | remote: Total 647 (delta 194), reused 204 (delta 137), pack-reused 373 (from 1) | ||
+ | Receiving objects: 100% (647/647), 149.27 | ||
+ | Resolving deltas: 100% (412/412), done. | ||
Running npm install | Running npm install | ||
- | <b class="WHI BBLK"> | + | <span style="background-color:# |
+ | <span style=" | ||
Building modules | Building modules | ||
Building... | Building... | ||
- | Done in 19.43s | + | Done in 23.25s |
</ | </ | ||
</ | </ | ||
行 249: | 行 384: | ||
<WRAP color_term> | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | <b class=GRN> | + | <font color="# |
</ | </ | ||
<WRAP color_result>< | <WRAP color_result>< | ||
- | > dev | + | & |
- | > node bin/cm.js devserver | + | & |
Starting compilation in watch mode... | Starting compilation in watch mode... | ||
- | Found 0 errors. Watching for file changes. | + | state/ |
- | Bundling state, view, language, commands, search, autocomplete, | + | & |
+ | |||
+ | Found 1 error. Watching for file changes. | ||
+ | Bundling state, view, language, commands, search, autocomplete, | ||
Dev server listening on 8090 | Dev server listening on 8090 | ||
Bundling done. | Bundling done. | ||
行 269: | 行 407: | ||
</ | </ | ||
- | ===== CodeMirror 5 ===== | + | ====== CodeMirror 5 ====== |
==== インストール ==== | ==== インストール ==== | ||
行 1069: | 行 1207: | ||
==== 動作確認 ==== | ==== 動作確認 ==== | ||
+ | ===== CodeMirror test 🤔 ===== | ||
<WRAP mincode src>< | <WRAP mincode src>< | ||
- | <div class=" | + | <div class=" |
+ | <link rel=" | ||
+ | <link rel=" | ||
+ | | ||
< | < | ||
- | | + | |
- | @import '/ | + | |
- | | + | |
- | */ | + | |
- | + | ||
- | .dokuwiki pre { | + | |
- | | + | |
} | } | ||
- | .embed_codemirror | + | |
- | | + | |
- | font-size: 11px; | + | |
} | } | ||
- | .select-theme .form-control { width: auto; display: inline-block; | + | |
</ | </ | ||
- | + | | |
- | <link rel=" | + | |
- | <link rel=" | + | |
<script src="/ | <script src="/ | ||
<!-- 言語に応じたjsファイルを読み込む --> | <!-- 言語に応じたjsファイルを読み込む --> | ||
<script src="/ | <script src="/ | ||
| | ||
- | <textarea id=" | + | <script> |
- | var jsEditor = CodeMirror.fromTextArea(document.getElementById(' | + | 'use strict'; |
- | mode: " | + | window.CodeMirror5 = CodeMirror; // 5.65.12 を保持 |
- | theme: " | + | // DOMContentLoaded 時に実行 |
- | lineNumbers: | + | document.addEventListener(' |
- | indentUnit: 4 | + | var jsEditor = CodeMirror5.fromTextArea(document.getElementById(' |
- | }); | + | mode: " |
- | </ | + | theme: " |
- | | + | lineNumbers: |
+ | indentUnit: 4 | ||
+ | }).setSize(null, | ||
+ | | ||
+ | |||
+ | var input = document.getElementById("select"); | ||
+ | function selectTheme() { | ||
+ | var theme = input.options[input.selectedIndex].textContent; | ||
+ | editor.setOption(" | ||
+ | location.hash = "#" | ||
+ | } | ||
+ | }); | ||
+ | | ||
| | ||
- | <script> | + | <textarea id=" |
- | var jsEditor = CodeMirror.fromTextArea(document.getElementById(' | + | var jsEditor = CodeMirror.fromTextArea(document.getElementById(' |
mode: " | mode: " | ||
theme: " | theme: " | ||
行 1110: | 行 1257: | ||
indentUnit: 4 | indentUnit: 4 | ||
}).setSize(null, | }).setSize(null, | ||
- | | + | |
- | </script> | + | <div class=" |
+ | <!-- < | ||
+ | <p>CodeMirror | ||
+ | </div> | ||
</ | </ | ||
</ | </ | ||
+ | |||
< | < | ||
- | <div class=" | + | <div class=" |
+ | <link rel=" | ||
+ | <link rel=" | ||
+ | | ||
< | < | ||
- | | + | |
- | @import '/ | + | |
- | | + | |
- | */ | + | |
- | + | ||
- | .dokuwiki pre { | + | |
- | | + | |
} | } | ||
- | .embed_codemirror | + | |
- | | + | |
- | font-size: 11px; | + | |
} | } | ||
- | .select-theme .form-control { width: auto; display: inline-block; | + | |
</ | </ | ||
- | + | | |
- | <link rel=" | + | |
- | <link rel=" | + | |
<script src="/ | <script src="/ | ||
<!-- 言語に応じたjsファイルを読み込む --> | <!-- 言語に応じたjsファイルを読み込む --> | ||
<script src="/ | <script src="/ | ||
| | ||
- | < | + | |
- | var jsEditor = CodeMirror.fromTextArea(document.getElementById(' | + | 'use strict'; |
+ | window.CodeMirror5 = CodeMirror; // 5.65.12 を保持 | ||
+ | // DOMContentLoaded 時に実行 | ||
+ | document.addEventListener(' | ||
+ | var jsEditor = CodeMirror5.fromTextArea(document.getElementById(' | ||
+ | mode: " | ||
+ | theme: " | ||
+ | lineNumbers: | ||
+ | indentUnit: 4 | ||
+ | }).setSize(null, | ||
+ | document.getElementById(' | ||
+ | |||
+ | var input = document.getElementById(" | ||
+ | function selectTheme() { | ||
+ | var theme = input.options[input.selectedIndex].textContent; | ||
+ | editor.setOption(" | ||
+ | location.hash = "#" | ||
+ | } | ||
+ | }); | ||
+ | </ | ||
+ | |||
+ | | ||
+ | var jsEditor = CodeMirror.fromTextArea(document.getElementById(' | ||
mode: " | mode: " | ||
theme: " | theme: " | ||
行 1150: | 行 1319: | ||
< | < | ||
</ | </ | ||
- | < | ||
- | var jsEditor = CodeMirror.fromTextArea(document.getElementById(' | ||
- | mode: " | ||
- | theme: " | ||
- | lineNumbers: | ||
- | indentUnit: 4 | ||
- | }).setSize(null, | ||
- | document.getElementById(' | ||
- | | ||
- | var input = document.getElementById(" | ||
- | function selectTheme() { | ||
- | var theme = input.options[input.selectedIndex].textContent; | ||
- | editor.setOption(" | ||
- | location.hash = "#" | ||
- | } | ||
- | </ | ||
</ | </ | ||
< | < | ||
- | document.querySelector(' | + | document.querySelector(' |
</ | </ | ||
</ | </ | ||
行 1175: | 行 1328: | ||
===== CodeMirror plugin for DokuWiki ===== | ===== CodeMirror plugin for DokuWiki ===== | ||
[[https:// | [[https:// | ||
- | ソースコード: | + | ソースコード: |
+ | [[git> | ||
<WRAP color_term> | <WRAP color_term> |