豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

List indentation #19490

@Witoso

Description

@Witoso

Provide a description of the task

Goal

Currently, we don’t accept margin on ul ol li . Depending on the configuration (GHS, indent, indent block) you will get different results.

Huuuge problem for import from Word incompatibility and migration from other HTML editors.

We need to be able to indent entire lists, independently of indenting their list items. Currently we have to do a bunch of hacks and patches to achieve this, so an upvote for supporting this in the core plugins!

Description

What is it?

Scope:

Functional requirements:

  • Supports bullet/numbered/multi-level/to do lists,
  • whole list indentation (preservation + UX with the keyboard and toolbar)
  • list item indentation (preservation + UX to remove with toolbar)
Image
<ol style="margin-left:40px;">
    <li style="margin-left:50px;">
        asdasdasd
    </li>
    <li style="margin-left:60px;">
        asdasdasd
    </li>
</ol>
  • UX allows indent/outdent lists

    • Support RTL
    • Keyboard
      • Indent scenario:
        • Selection: Collapsed or Touching the beginning, beginning of the first list item top of the list (not nested)
        • Trigger: TAB / Indent button
        • Result: Indent of the whole list increases.
      • Outdent scenario
        • Selection: Collapsed, beginning of the first list item top of the list (not nested)
        • Trigger: Only outdent button
        • Result: Indent of the whole list increases.
  • UX to remove indent from list items - TBD is this useful (yes, one less GHS preservation?)

    • Selection: in the list item.
    • Trigger: Outdent
    • Condition: List item has its individual indent
    • Result: Whole indent of list item removed.
  • Configuration

    • inherits from block indentation
  • Preserve correctly import/paste scenarios with

    • “left” margins on lists
    • “left” margins on list items
<ol style="margin-left:40px;">
    <li style="margin-left:50px;">
        asdasdasd
    </li>
    <li style="margin-left:60px;">
        asdasdasd
    </li>
</ol>

Non-functional requirements:

  • This is not about implementing skip-level lists
  • Some of the actions mentioned here may be done later by Ruler, like indenting list items but we are not interested in it right now.

📃 Other details

  • Browser: …
  • OS: …
  • CKEditor version: …
  • Installed CKEditor plugins: …

Metadata

Metadata

Assignees

Labels

squad:coreIssue to be handled by the Core team.support:2An issue reported by a commercially licensed client.type:taskThis issue reports a chore (non-production change) and other types of "todos".

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions