差分
このページの2つのバージョン間の差分を表示します。
| 次のリビジョン | 前のリビジョン | ||
| javascript:preact [2025/04/07 16:40] – 作成 ともやん | javascript:preact [2025/04/08 07:27] (現在) – [ビルドツールを使わない方法] ともやん | ||
|---|---|---|---|
| 行 21: | 行 21: | ||
| </ | </ | ||
| <script type=" | <script type=" | ||
| - | import {javascript} from "https:// | + | import {javascript} from 'https:// |
| - | import {basicSetup} from "https:// | + | import {basicSetup} from 'https:// |
| - | import {EditorView, | + | import {EditorView, |
| - | import {defaultKeymap} from "https:// | + | import {defaultKeymap} from 'https:// |
| + | //import { solarizedDark } from ' | ||
| + | import { monokai } from ' | ||
| let myView = new EditorView({ | let myView = new EditorView({ | ||
| - | doc: ` // html | + | doc: `<div id=" |
| - | //<div id=" | + | |
| + | <script type=" | ||
| import { h, Component, render } from ' | import { h, Component, render } from ' | ||
| 行 35: | 行 37: | ||
| const app = h(' | const app = h(' | ||
| - | render(app, document.getElementById("app")); | + | render(app, document.getElementById('app')); |
| - | `, | + | </ |
| extensions: [keymap.of(defaultKeymap)], | extensions: [keymap.of(defaultKeymap)], | ||
| - | parent: document.getElementById("editor"), | + | parent: document.getElementById('editor'), |
| extensions: [ | extensions: [ | ||
| basicSetup, | basicSetup, | ||
| javascript({typescript: | javascript({typescript: | ||
| + | monokai, | ||
| ] | ] | ||
| }) | }) | ||
| 行 53: | 行 56: | ||
| const app = h(' | const app = h(' | ||
| - | render(app, document.getElementById("app")); | + | render(app, document.getElementById('app')); |
| </ | </ | ||
| 行 59: | 行 62: | ||
| ===== 参考文献 ===== | ===== 参考文献 ===== | ||
| - | [[https:// | + | [[https:// |