ckeditor / ckeditor4

The best enterprise-grade WYSIWYG editor. Fully customizable with countless features and plugins.
https://ckeditor.com/ckeditor-4
Other
5.78k stars 2.46k forks source link

Increasing and Decreasing Indentation in Bulleted Lists is Inconsistent #5464

Open jmyszka23 opened 1 year ago

jmyszka23 commented 1 year ago

Type of report

Bug

  1. Create the below bulleted list scenario
  2. Put the cursor on the line called "line 1"
  3. Attempt to Increase Indent and then Decrease Indent of that line

Screenshot 2023-04-18 at 10 21 24 PM

Expected result

Only "line 1"'s indent increases and then decreases. If step 3 is done on "line 2" or "line 3", then only those individual lines have their indents increase and then decrease.

Actual result

The indent of "line 1", "line 2" and "line 3" all increase and then decrease

Other details

Comandeer commented 1 year ago

I can confirm the inconsistency.

jonmyszka commented 1 year ago

Hi @Comandeer, is there any estimate you can provide on when this issue might get fixed? I understand that nobody is even assigned to it yet, but I was wondering if there was a typical length of time that these issues usually get fixed within. I was also curious if there are any possible workarounds in the meantime.

Thanks!

Comandeer commented 1 year ago

@jonmyszka, unfortunately, there is no ETA for this issue as at the moment we have some other priorities. If you would like to speed things up and have a CKEditor 4 license, please contact our support team (e.g. by using ckeditor.com/contact ).

Comandeer commented 1 year ago

After some research, I'm changing the type of the issue to a feature request.

The current behavior is caused by the interaction between two different plugins:

  1. Indent List,
  2. Indent Block.

The first one is responsible for indenting individual list items, except the first items in lists. To indent the first item the second plugin is needed which indents the whole list, treating it as a block element. This difference is intentional and the current logic of the above plugins reflects it.

Changing the current behavior would require de facto rewriting the whole logic of the Indent List plugin and modifying the Indent Block one and probably even the List one (as Indent List uses several list-oriented utils from the List plugin). Additionally, it would require introducing an additional config variable to act as a switch between the two indent behaviors: the current one and the new one, proposed in this issue. Such a switch would be required to avoid introducing a breaking change to the editor.

There is, however, one, probably not intended, difference in behavior: the first list item could be indented only using the toolbar button while subsequent ones – also by pressing the Tab key. Probably the Indent Block plugin should also use the Tab key.