steven-tey / novel

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

feat: clear nodes on node selector #322

Closed brunocroh closed 5 months ago

brunocroh commented 5 months ago

description

In some cases when select a new node on node selector, it remains with previous selection

https://github.com/steven-tey/novel/assets/13812512/0a297629-c2b1-4fec-ae55-cb51ea59bd93

What I did

I added .clearNodes()to all command chains on select nodes, this way all nodes become a paragraph, before to be applied new node, removing completely old node references.

Screenshot 2024-03-02 at 22 58 15

Result

https://github.com/steven-tey/novel/assets/13812512/b82fd967-8057-47e9-94b2-3cc5c1dcb393

vercel[bot] commented 5 months ago

@brunocroh is attempting to deploy a commit to the Elegance Team on Vercel.

A member of the Team first needs to authorize it.