jotdown_wasm: prefix html ids with jotdown-
avoid potential conflicts if included
This commit is contained in:
parent
c0bee7db78
commit
0af2c46c57
1 changed files with 7 additions and 7 deletions
|
@ -7,9 +7,9 @@
|
|||
} from './pkg/jotdown_wasm.js';
|
||||
await init();
|
||||
|
||||
let output = document.getElementById("output");
|
||||
let input = document.getElementById("input");
|
||||
let fmt = document.getElementById("fmt");
|
||||
let output = document.getElementById("jotdown-output");
|
||||
let input = document.getElementById("jotdown-input");
|
||||
let fmt = document.getElementById("jotdown-fmt");
|
||||
|
||||
function render() {
|
||||
if (fmt.value == "html") {
|
||||
|
@ -36,15 +36,15 @@
|
|||
setTimeout(() => { input.focus(); }, 0);
|
||||
</script>
|
||||
<div>
|
||||
<select id="fmt">
|
||||
<select id="jotdown-fmt">
|
||||
<option value="preview">preview</option>
|
||||
<option value="html">html</option>
|
||||
<option value="events">events</option>
|
||||
<option value="events_indent">events (indented)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="panes" style="display:flex;height:100%;gap:1rem">
|
||||
<pre id="input" contenteditable="true" placeholder="Input djot here" style="width:50%;height:100%;overflow:scroll;resize:none;box-sizing:border-box;margin:0">*Hello world!*</pre>
|
||||
<pre id="output" readonly style="width:50%;height:100%;overflow:scroll;box-sizing:border-box;margin:0"></pre>
|
||||
<div id="jotdown-panes" style="display:flex;height:100%;gap:1rem">
|
||||
<pre id="jotdown-input" contenteditable="true" placeholder="Input djot here" style="width:50%;height:100%;overflow:scroll;resize:none;box-sizing:border-box;margin:0">*Hello world!*</pre>
|
||||
<pre id="jotdown-output" readonly style="width:50%;height:100%;overflow:scroll;box-sizing:border-box;margin:0"></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue