aimeos / ai-admin-jqadm

Aimeos e-commerce Vue.js+Bootstrap based admin interface
https://aimeos.org
GNU Lesser General Public License v3.0
184 stars 43 forks source link

Change/add editor config options. #145

Closed rowild closed 4 years ago

rowild commented 4 years ago

Add a removeButtons option and change editortags and extraPlugins config options, so users can override them.

Necessary, because CKEditor Standard Edition v4 (jsdelivr fetches from npm, which send a "standard all" edition) comes with all non-community plugins deactivated and a "removeButtons" setting (undocumented which buttons are removed by default). But things like text align require plugins to be activated respectively Subscript or Superscript require certain buttons to be set to visible.

Along with this PR comes a new chapter "customize" in the Aimeos "Admin/JQAdm backend" documentation.

aimeos commented 4 years ago

The indentions are wrong, can you fix them please?

rowild commented 4 years ago

Fixed both. Thank you!

aimeos commented 4 years ago

One more suggestion: Prefix all new options with "editor" so the developers know they belong to the ckeditor, i.e:

editorPlugins
editorRemoveButtons
rowild commented 4 years ago

Good idea! How about "htmleditor", "texteditor", or "ckeditor"? The docu and the code already have a lot of "editor" strings, which mostly refer to the user group definition and not to text editing... I would prefer "ckeditor".

aimeos commented 4 years ago

Not for 2020.10 because this would be breaking

rowild commented 4 years ago

Is this also true for "editorTags" instead of editortags"?

Can you please one last time confirm/fix?

editorPlugins <== not "editorExtraPlugins"? editorRemoveButtons editorTags <== or keep "editortags"?

aimeos commented 4 years ago

Good point. I would use

editorplugins
editorremove

to keep the config options short

rowild commented 4 years ago

OK, fixes coming up soon... Thanks!

rowild commented 4 years ago

Actually no. I must be a PITA once more in respect to "editorremove". CKEditor has more remove options, like "removeFormat", "removeListeners", "removeAllListeners", and "removeMenuItem". For the sake of being future proof (or whatever), I would recommend to be precise and stick with "editorremovebuttons" (which looks horrible, why not camel case?). Also "editorextraplugins" instead of "editorplugins", since there is a "plugins" key on CKEDITOR.

aimeos commented 4 years ago

OK, then camel case

rowild commented 4 years ago

The naming convention of the configurable options was adapted:

editorcfg: was left as is for backwards compatibility editortags: detto editorExtraPlugins: the prefix "editor" and camelcase notation is now used editorRemoveButtons: [New option] prefixed with "editor" and camelcased

These changes go along with code changes in aimeos-docs.

aimeos commented 4 years ago

Thanks a lot for your PR! :-)