Skip to content

Commit cd7b78d

Browse files
authored
[5.2] TinyMCE Accordion (#43577)
* [5.2] Cleanup of return types for phpstan (#43350) * Cleanup of return types * Return nothing instead of an empty string * Update OverridesModel.php * [5.2] TinyMCE Accordion Since Joomla 5.0 we have shipped a version of tinyMCE that includes a plugin called accordion. However we never exposed it to our plugin so it was not available to use. This PR remedies that. New installs will see the accordion icon on the toolbar with the list icons For existing installs you will need to EITHER drag the icon into the toolbar in the plugin configuration OR if you havent changed the toolbar you can use the clear and the the use advanced preset buttons. Technically tinymce have misnamed the the plugin as it should not be confused with other accordion functionality such as the js based solution that can be enabled with bootstrap. This plugin implements the native html details/summary disclosure element which requires no javascript and is accessible out of the box. To test As this requires a js change either apply the pr and run `nmp ci` or use one of the prebuilt packages If it is a new install then the icon will now be able in the toolbar. If it is an upgrade then you will need to use the tinymce plugin editor to add it (as described above) * cs
1 parent 08fa3b9 commit cd7b78d

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

build/media_source/plg_editors_tinymce/js/tinymce-builder.es6.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/editors/tinymce/src/PluginTraits/KnownButtons.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public static function getKnownButtons()
8181
'language' => ['label' => 'Language'],
8282

8383
// Buttons from the plugins
84+
'accordion' => ['label' => 'Accordion', 'plugin' => 'accordion'],
8485
'anchor' => ['label' => 'Anchor', 'plugin' => 'anchor'],
8586
'hr' => ['label' => 'Horizontal line'],
8687
'ltr' => ['label' => 'Left to right', 'plugin' => 'directionality'],

plugins/editors/tinymce/src/PluginTraits/ToolbarPresets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function getToolbarPreset()
6666
'styles', '|',
6767
'blocks', 'fontfamily', 'fontsize', '|',
6868
'searchreplace', '|',
69-
'bullist', 'numlist', '|',
69+
'bullist', 'numlist', 'accordion', '|',
7070
'outdent', 'indent', '|',
7171
'undo', 'redo', '|',
7272
'link', 'unlink', 'anchor', 'image', '|',

0 commit comments

Comments
 (0)