add table n stuff

This commit is contained in:
2026-01-12 11:50:33 +13:00
parent 8f9733d2b2
commit e448e68c1d
2 changed files with 26 additions and 7 deletions

View File

@@ -2,13 +2,13 @@
import "../styles/global.css"
---
<script is:inline>
<script>
import Quill from "quill";
const quill = new Quill('#editor', {
modules: {
toolbar: [
[{ header: [1, 2, false] }],
// [{ header: [1, 2, false] }],
['bold', 'italic', 'underline'],
['image'],
],
@@ -17,6 +17,14 @@ import "../styles/global.css"
theme: 'snow', // or 'bubble'
});
document.querySelector("#render")?.addEventListener('click', () => {
const contents = JSON.stringify(quill.getContents())
const el = document.getElementById("result")
el!.innerText = contents
})
</script>
@@ -37,13 +45,12 @@ import "../styles/global.css"
<p><br /></p>
</div>
<!-- <button id="render" class="mt-2" onclick="renderText">
<button id="render" class="mt-2">
render
</button> -->
</button>
<div id="snya">
<div id="result">
</div>
</body>
</html>