Move EditorContent to editor directory

This commit is contained in:
Jon Staab
2025-02-05 08:17:51 -08:00
parent 565ccb399a
commit af171bd2c9
5 changed files with 4 additions and 26 deletions
-22
View File
@@ -1,22 +0,0 @@
<script lang="ts">
import {onDestroy, onMount} from "svelte"
const {editor} = $props()
let element: HTMLElement
onMount(() => {
if (element) {
element.append(...(Array.from(editor.options.element.childNodes) as any))
editor.setOptions({element})
editor.contentElement = element
}
})
onDestroy(() => {
editor.contentElement = null
editor.setOptions({element: null})
})
</script>
<div bind:this={element}></div>