差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン | |||
javascript:preact [2025/04/08 07:11] – ともやん | javascript:preact [2025/04/08 07:27] (現在) – [ビルドツールを使わない方法] ともやん | ||
---|---|---|---|
行 29: | 行 29: | ||
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 ' | ||
行 37: | 行 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, | ||
行 56: | 行 56: | ||
const app = h(' | const app = h(' | ||
- | render(app, document.getElementById("app")); | + | render(app, document.getElementById('app')); |
</ | </ | ||