backdrop-contrib / tinymce

Integration for the TinyMCE editor in Backdrop CMS
https://backdropcms.org/project/tinymce
GNU General Public License v2.0
2 stars 1 forks source link

Lists and feature parity with CK5 #60

Closed indigoxela closed 8 months ago

indigoxela commented 8 months ago

CKE5 provides additional list properties for OL elements.

While TinyMCE provides list styles (and a little hidden the "start" attribute), it doesn't provide the "reversed" property out of the box. To achive that, a custom plugin is needed.

As a context menu it would be quite easy. The UX might not be ideal because of different dialogs for the same element...

indigoxela commented 8 months ago

Looks OK, works... not sure, yet. listprops-context-menu

The usual glitch - are people aware of the context menu and how to add it to profiles?

Another option would be a context toolbar (like in tinymce_imce), but they're a bit ... visually noisy.

yorkshire-pudding commented 8 months ago

I wasn't aware of context menus or how to add to profiles. I would prefer context menu to context toolbar The only way I could figure out doing start (just learned that is an HTML feature) was editing source code; am I missing an easier trick?

indigoxela commented 8 months ago

Yay, feedback! :tada:

I wasn't aware of context menus or how to add to profiles.

Profiles can set them like that: https://github.com/backdrop-contrib/tinymce/blob/1.x-1.x/config/tinymce.profiles.default.json#L10

Note that the new backdroplistprops context menu isn't added there, yet.

Figuring out, which one's are available in an active editor ... can be done via console. On a page (node form) with an active editor run following in your browser dev tools:

tinymce.activeEditor.ui.registry.getAll('contextMenus').contextMenus 

That's maybe not very obvious. :speak_no_evil: And a bit nerdish... Any plugin can ship with additional contextmenus.

I would prefer context menu to context toolbar

May I know the reason?

indigoxela commented 8 months ago

While the initial PR is fine as a proof-of-concept, it has bad UX in many ways.

  1. Two different dialogs, both just containing a single form item, one button named "List properties", which promises more than it provides
  2. When the focus isn't inside the OL, the context menu works as expected, but the "List props" button appears disabled (quirk in the "lists" plugin)
  3. OL has a context menu, UL has not (start/reversed only work on OL) - confusing
  4. The context menu's there without the advlist plugin, but its functionality (start/reversed) is quite exotic - confusing

So I'll have to think the UX over a bit. And I don't think, this is an urgent feature, anyway.

... And a little more feedback maybe ...

indigoxela commented 8 months ago

Already better: a single button, a single dialog. And as I dropped using listprop button from lists plugin, the "disabled" quirk is also gone.

new-listprop-dialog