steven-tey / novel

Notion-style WYSIWYG editor with AI-powered autocompletion.
https://novel.sh
Apache License 2.0
13.25k stars 1.08k forks source link

feat: add isEditable to the condition on bubble menu #249

Closed motoya-k closed 9 months ago

motoya-k commented 1 year ago

https://tiptap.dev/api/extensions/bubble-menu The default behavior of the bubble menu seems to hide it when 'editable' is falsy. However, in the current implementation, it appears to be overridden by shouldShow.

I have modified it within the PR to also consider editor.isEditable.

https://github.com/steven-tey/novel/issues/153

https://github.com/steven-tey/novel/assets/38897355/ddddd26b-bc12-4ac9-9c82-29877cdfbf8a

vercel[bot] commented 1 year ago

@motoya-k is attempting to deploy a commit to the Elegance Team on Vercel.

A member of the Team first needs to authorize it.

mathiasrscom commented 11 months ago

This one is the sole reason why I had to create a custom renderer. If we can make this work, then we can render the editor where we are only supposed to show the content.

Surya-Git-hub commented 11 months ago

please merge this PR, this is a much needed feature

andrewdoro commented 9 months ago

0.2.0-canary.0 With the new package you can just hide the bubble menu from the component tree. https://novel.sh/docs/quickstart#anatomy