friendofsvelte / tipex

An goto sytled text editor for SvelteKit; based on TipTap; tipex
https://tipex.pages.dev/
43 stars 0 forks source link

Error: Uncaught TypeError: editorsParent is null #12

Closed bluepuma77 closed 3 months ago

bluepuma77 commented 6 months ago

Maybe add an if around this:

Uncaught TypeError: editorsParent is null
    onFocusChange Tipex.svelte:61
    instance4 Tipex.svelte:64

I am currently trying to get htmlContent to reflect the current (changed) content in Tipex, but that does not seem to work:


<Tipex
    bind:htmlContent={htmlContent}
    style="margin: 1rem; margin-bottom: 0rem;"
    class="h-[70vh] border border-neutral-200 dark:border-neutral-700 w-full"
>
    <svelte:fragment slot="utilities">
        <Utility />
        {#if saveFunction}
            <button type="button" class="tipex-action-button w-12tipex-click-effect" on:click={saveFunction(htmlContent)}>Save</button>
        {/if}
    </svelte:fragment>
</Tipex>
Bishwas-py commented 5 months ago

Try this $tipexEditor.getHTML() to get html.

FYI: $tipexEditor.getText() -> to get plain text. $tipexEditor.getJson() -> to get content data in json.

Bishwas-py commented 3 months ago

Closing it for now. Feel free to re-ask or open.