sibiraj-s / svelte-tiptap

Svelte components for tiptap v2
https://sibiraj-s.github.io/svelte-tiptap/
MIT License
225 stars 18 forks source link

Editable component doesn't allow backspace or most editing operations if initial content is empty. #20

Closed tomconnors closed 1 year ago

tomconnors commented 1 year ago

To reproduce this issue, change the code on the "advanced editor" demo page from

<svelte-editable-component>This is editable</svelte-editable-component>

to

<svelte-editable-component></svelte-editable-component>

Then try to edit the editable region. You'll find that you can't navigate backward with the left arrow key. If you look at the DOM, you'll see that the custom content is being added to the id="editable-component" element, rather than the span inside that element.

sibiraj-s commented 1 year ago

Try v1, several improvements were made to svelte renderer it should fix these, I tried that on my machine, this doesn't happen.

And, make sure the svelte-editable-component only has one contentenditable field. If there are any other blocks make sure to add contenteditable=false to it.

See https://github.com/sibiraj-s/svelte-tiptap/issues/18 for more info.

github-actions[bot] commented 4 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.