steven-tey / novel

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

bug: editor.chain(...).focus(...).toggleUnderline is not a function when underlining a word #435

Open FreeSpirit777 opened 1 month ago

FreeSpirit777 commented 1 month ago

Provide environment information

System: OS: Linux 6.1 Fedora Linux 38 (Thirty Eight) CPU: (3) x64 11th Gen Intel(R) Core(TM) i3-1115G4 @ 3.00GHz Memory: 1.76 GB / 3.98 GB Container: Yes Shell: 5.2.26 - /bin/bash Binaries: Node: 18.19.0 - /usr/bin/node npm: 10.2.3 - /usr/bin/npm pnpm: 9.6.0 - /usr/local/bin/pnpm bun: 1.1.20 - ~/.bun/bin/bun

Describe the bug

Hi, I'm working with the novel-tailwind-example. I have upgraded all packages to the newest versions but now I get the error: "TypeError: editor.chain(...).focus(...).toggleUnderline is not a function" when underlining a word and "TypeError: editor.commands.unsetColor is not a function" when trying to give another color. What can I do?

Link to reproduction

https://github.com/steven-tey/novel/tree/main/examples/novel-tailwind

To reproduce

See above

Additional information

No response

jiaweing commented 1 month ago

I have the same issue as well.

TypeError: editor.commands.unsetColor is not a function
Darpan-favfly commented 1 month ago

I have same issue please give us a solution

image image

mathiasrscom commented 1 month ago

I got the same for for editor?.chain().unsetHighlight().run() I need to revert back until this is solved.

Gaoridang commented 1 month ago

I've made a PR for this issue. It may resolve the error!

rajinsyed commented 3 weeks ago

Getting the same issue. editor.chain(...).focus(...).setLatex is not a function

yamz8 commented 3 weeks ago

I've made a PR for this issue. It may resolve the error!

thanks for that, you don't have to wait for the pr,

just add that to your extension file:

TiptapUnderline, Color, TextStyle, HighlightExtension.configure({ multicolor: true, }),