Extending this plugin to other elements

Created on 16 November 2023, over 1 year ago

What would it take to extend this to work on other elements beside P? For instance, if I use the CKEditor Div Manager β†’ plugin, it would be nice to be able to indent and outdent DIV elements.

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States brad.bulger

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @brad.bulger
  • πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

    I'm a definite +1 for extending support to other elements β€” headings, in my case.

    Not opposed to <div> support at all, but work in that direction seems questionable right now as "core" support for divs and other container elements is blocked upstream (see #3418322 ✨ [upstream] [GHS] Allow CKEditor 5 support for containers: div, article, section, aside, etc. Postponed ).

    I haven't tested Div Manager myself, but the CKE5 version (3.0) is still alpha. Judging from the issue queue the alpha tag is apt.

  • Merge request !13Update affected elements β†’ (Open) created by justcaldwell
  • Pipeline finished with Success
    23 days ago
    Total: 159s
    #481485
  • πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

    MR 13 allows any valid `$text-container` element (e.g. headers) to be indented.

    It also updates the CSS to remove the element targets (p, ol, ul). List element are indented by nesting a new list container, so the class is not used in that case anyway. I also changed the units from `em` to `rem` to ensure consistent indents where font-sizes might vary (again, e.g. headings).

    Static patch attached.

Production build 0.71.5 2024