text icon indicating copy to clipboard operation
text copied to clipboard

Switching between list types is not possible anymore

Open juliusknorr opened this issue 3 years ago • 4 comments

When having the cursor set in a list it is no longer possible to switch to a different type, e.g. from bullet list to checkbox

juliusknorr avatar Oct 15 '22 11:10 juliusknorr

Switching between bullet and numbered list seems to work fine for me. "Only" issue seems to be switching between checkbox and the other two list types in either way. When on a checkbox list the other two list types are greyed out. So looks like tiptap already thinks it cannot do this.

I don't remember how this was fixed after the tiptap2 migration but i remember discussing it at length in a tiptap issue: https://github.com/ueberdosis/tiptap/issues/2428

max-nextcloud avatar Oct 18 '22 04:10 max-nextcloud

The problem seems that some commands are reported as not possible by $editor.can() even though they can be used without problems. E.g. switching from a bullet list to either of ordered list (Ctrl-Shift-7), check list (Ctrl-Shift-9) or blockquote (Ctrl-Shift-B) works well via keyboard shortcuts, even though e.g. $editor.can().toggleOrderedList() returns false, leading to the corresponding menu action being disabled.

Related upstream issue: https://github.com/ueberdosis/tiptap/issues/4057

mejo- avatar Jun 07 '23 11:06 mejo-

I looked a bit into this when checking other list issues:

It seems that this part here is failing to validate that the list items are valid content for the different types bullet and task list for example, as task list uses a different taskitem node type: https://github.com/ueberdosis/tiptap/blob/d6657233e718ee465dbe096c8f40a7910d15e696/packages/core/src/commands/toggleList.ts#L98

We or tiptap either would need to switch to a shared item node type or maybe could rework the command to not only change the list type but also the list item types. Haven't looked further on what would be the best or lowest effort approach.

juliusknorr avatar Aug 29 '23 17:08 juliusknorr

The problem seems that some commands are reported as not possible by $editor.can() even though they can be used without problems. E.g. switching from a bullet list to either of ordered list (Ctrl-Shift-7), check list (Ctrl-Shift-9) or blockquote (Ctrl-Shift-B) works well via keyboard shortcuts, even though e.g. $editor.can().toggleOrderedList() returns false, leading to the corresponding menu action being disabled.

Related upstream issue: ueberdosis/tiptap#4057

So it is possible to do it with a shortcut but the menu can't do it? That's very confusing 🥲

Image

It's a bit of a frequent annoyance so I'm going to try to learn the shortcuts then, I'm very happy with the shortcut overview in that regard. Makes it easy.

jospoortvliet avatar Oct 02 '25 11:10 jospoortvliet