ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Custom unordered list markers are removed despite GHS

Open jacekbogdanski opened this issue 2 years ago β€’ 9 comments

πŸ“ Provide detailed reproduction steps (if any)

Configure GHS to allow list-style-type attribute:

const ghsConfig = {
  allow: [
     {
        name: /^(?:ul|ol|li)$/u,
	styles: [ 'list-style-type' ]
      }
  ]
}

Feed the editor with HTML like:

<ul style="list-style-type: 'ΒΆ '">
  <li>item 1</li>
</ul>

βœ”οΈ Expected result

The custom list marker is preserved.

❌ Actual result

The custom list marker is removed from the HTML.

❓ Possible solution

If you have ideas, you can list them here. Otherwise, you can delete this section.

πŸ“ƒ Other details

  • Browser: …
  • OS: …
  • First affected CKEditor version: …
  • Installed CKEditor plugins: document lists, general HTML support

If you'd like to see this fixed sooner, add a πŸ‘ reaction to this post.

jacekbogdanski avatar Apr 12 '23 15:04 jacekbogdanski

Works correctly for the Document lists, @jacekbogdanski any need from your side to add it to the List, etc.?

Witoso avatar Apr 12 '23 17:04 Witoso

Ok, I found a case where it doesn't work. Without DocumentListProperties plugin it works correctly, with this plugin the list-style-type is lost.

Fix scope: Given I have DocumentList, DocumentListProperties, and GHS configured, the list-style-type is preserved in the styles attributes.

Witoso avatar Apr 17 '23 08:04 Witoso

Is it possible to add custom list markers in a less round-about way? I'd love to be able to extend the plugin, or better still: add configuration so that i can add custom "markers"/list-style-types

Badlapje avatar Oct 25 '23 13:10 Badlapje

I can see 2 options, IDK which is better:

  1. The upcast converter for the list style attribute should not consume unknown values, those should be handled by GHS.
  2. The list style should allow unknown values in the model but it will not be reflected in the UI (same as supportAllValues option for font family, font size, etc.)

niegowski avatar Nov 13 '23 15:11 niegowski

Question from my side would be, which one brings us a step closer to the feature of custom list markers (defined maybe in the UI or by integrator) but is a good starting point to unblock current cases.

Witoso avatar Nov 14 '23 08:11 Witoso

Question from my side would be, which one brings us a step closer to the feature of custom list markers (defined maybe in the UI or by integrator) but is a good starting point to unblock current cases.

I think we should go with option 2 so it will be consistent with the font features.

niegowski avatar Nov 14 '23 12:11 niegowski

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Nov 13 '24 23:11 CKEditorBot

any progress on this?

Badlapje avatar Nov 14 '24 09:11 Badlapje

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Nov 14 '25 23:11 CKEditorBot

We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

CKEditorBot avatar Dec 15 '25 23:12 CKEditorBot