ueberdosis / tiptap

The headless rich text editor framework for web artisans.
https://tiptap.dev
MIT License
24.61k stars 2.06k forks source link

[Bug]: Vue Composition API - useEditor not supporting reactive references #5056

Open Ericlm opened 2 months ago

Ericlm commented 2 months ago

Which packages did you experience the bug in?

vue

What Tiptap version are you using?

2.3.0

What’s the bug you are facing?

Hello there! I wanted to report that there is currently no way for the useEditor function to support the reactivity of Vue 3 as it expects raw boolean for the editable property, or raw string for the placeholder.

While we can workaround this for the placeholder as it can use a function to determine the string to display, this is not the case of the editable property.

I think the useEditor function should support at least a callback for the editable property, or at best, that the whole useEditor handles Vue refs system.

What browser are you using?

Firefox

Code example

https://github.com/Ericlm/tiptap-vue-composition

What did you expect to happen?

I expected the useEditor function to support reactive objects directly, like refs. (like the Vueuse framework does often.) Or at least to support a callback, so I can inject the reactivity there.

Anything to add? (optional)

No response

Did you update your dependencies?

Are you sponsoring us?

Sraleik commented 1 month ago

:+1:

Same problem