add table n stuff
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user