feat: make default value display correctly
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
onMount(async () => {
|
||||
const {quill} = await import('./quill.js')
|
||||
destroy = quill(node, options)
|
||||
|
||||
node.firstChild.innerHTML = data
|
||||
})
|
||||
|
||||
onDestroy(() => {
|
||||
@@ -26,5 +28,5 @@
|
||||
</script>
|
||||
|
||||
<div class={className}>
|
||||
<div bind:this={node} on:text-change>{@html data}</div>
|
||||
<div bind:this={node} on:text-change />
|
||||
</div>
|
||||
|
||||
@@ -36,7 +36,6 @@ export function quill(node, options) {
|
||||
modules: {
|
||||
toolbar,
|
||||
},
|
||||
placeholder: 'Digite algo...',
|
||||
...options,
|
||||
})
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<link rel="preconnect" href="https://cdn.quilljs.com" crossorigin />
|
||||
<link rel="stylesheet" href="https://cdn.quilljs.com/1.3.7/quill.snow.css" crossorigin />
|
||||
<link rel="preconnect" href="https://cdn.quilljs.com" />
|
||||
<link rel="stylesheet" href="https://cdn.quilljs.com/1.3.7/quill.snow.css" />
|
||||
</svelte:head>
|
||||
|
||||
<Editor {options} on:text-change={onTextChange} data="Apenas um show" />
|
||||
<Editor {options} on:text-change={onTextChange} data="<p>test</p><p>sample</p>" />
|
||||
|
||||
Reference in New Issue
Block a user