Open ggaabe opened 3 years ago
In case somebody has the same issue.
Example in Github readme didn't work for me, I noticed you can get the html element and access hidden __quill
property or use Quill directly - which is way nicer.
So I did that:
<script lang="ts">
import Quill from 'quill/core';
let quillElement;
onMount(() => {
const editorInstance = Quill.find(quillElement);
editorInstance?.setText(initialText);
});
</script>
<div class="wysiwyg-container">
<div bind:this={quillElement}
use:quill={options}
on:text-change></div>
</div>
</style>
I'm new to svelte so maybe I'm missing something, but as far as I can tell, with the svelte implementation being inline within the HTML, there's no way to retrieve the quill instance. Is that correct?