Skip to content

Initial value doesn't work #1

@kangruixiang

Description

@kangruixiang

Hi there. I tried to do a very simple test with initial value as follows. I'm using Svelte 5.33.3 and svelte-trix 0.0.5.

import { TrixEditor } from 'svelte-trix';
let trixTest = $state('<div>Test<div/>');

<TrixEditor bind:value={trixTest} />
{trixTest}

This is what I'm getting. I couldn't get the initial value to show up in the text box:
Image

Editing inside the editor, however, changes the value immediately as intended:

Image

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions