text icon indicating copy to clipboard operation
text copied to clipboard

Switching from list item to Blockquote is not possible

Open julien-nc opened this issue 3 years ago • 3 comments

When selecting the content of a list item and pressing the "Blockquotes" menu action, nothing happens. There is no error in the browser logs.

Changing a list item into a "Code block" works fine though.

julien-nc avatar Apr 12 '22 09:04 julien-nc

Currently (on latest master and on stable25), the blockquote menu item is disabled when selecting text in a list item. This seems sensible to me, given that our editor schema disallows blockquotes inside a list item.

This is new behaviour in Nextcloud 25. Up to Nextcloud 24, the blockquote menu item is still actionable inside a list item, but doesn't have any effect.

So while the situation improved a bit with Nextcloud 25, we still have an issue here:

  • Code block can be toggled when inside a list item, transforming the list item into a code block
  • Block quote cannot be toggled when inside a list item, resulting in inconsistent user experience

mejo- avatar Nov 01 '22 11:11 mejo-

Might be related to #3256

juliusknorr avatar Nov 02 '22 11:11 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 issues: https://github.com/ueberdosis/tiptap/issues/3743 and https://github.com/ueberdosis/tiptap/issues/4057

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