[Documentation]: Svelte installation guide not compatible with Svelte 5 #6025
Labels
Category: Open Source
The issue or pull reuqest is related to the open source packages of Tiptap.
Type: Documentation
The issue or pullrequest is related to documentation
What’s the URL to the page you’re sending feedback for?
https://tiptap.dev/docs/editor/getting-started/install/svelte
What part of the documentation needs improvement?
The Svelte guide for TipTap is made for components with Svelte 4 syntax, i.e. without runes. In runes mode, state needs to be defined using
$state()
, and usingeditor = editor
no longer works to trigger an update, as can be seen here.For Svelte 5, instead, the new
createSubscriber()
API should be used, which can be used to manually tell Svelte when to trigger an update (i.e. on transaction). The code to make the editor reactive can look something like this (repl):Or, without a proxy, but then has to be accessed using
editor.current
instead, which is not ideal as the editor itself doesn't change:The text was updated successfully, but these errors were encountered: