Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions administrator/language/en-GB/plg_editors_tinymce.ini
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ PLG_TINY_FIELD_VALUE_SLIDING="Sliding"
PLG_TINY_FIELD_VALUE_WRAP="Wrap"
PLG_TINY_FIELD_WORDCOUNT_LABEL="Word Count"
PLG_TINY_LEGACY_WARNING="<p>The <a href=\"%s\">TinyMCE Editor Plugin</a> has been updated. Currently it uses your existing configuration. By editing the plugin, you can now assign and customise various layouts to specific user groups.</p><p>Warning: when editing the plugin, you will lose all your previous settings!</p>"
PLG_TINY_MENU_CONTAINER="Container"
PLG_TINY_SET_PRESET_BUTTON_ADVANCED="Use advanced preset"
PLG_TINY_SET_PRESET_BUTTON_MEDIUM="Use medium preset"
PLG_TINY_SET_PRESET_BUTTON_SIMPLE="Use simple preset"
Expand Down
12 changes: 12 additions & 0 deletions plugins/editors/tinymce/tinymce.php
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ public function onDisplay(

// Disable TinyMCE Branding
'branding' => false,

)
);

Expand Down Expand Up @@ -670,6 +671,17 @@ public function onDisplay(
array('title' => 'Tag', 'value' => 'tag'),
);

$scriptOptions['style_formats'] = array(
array('title' => Text::_('PLG_TINY_MENU_CONTAINER'), 'items' => array(
array('title' => 'article', 'block' => 'article', 'wrapper' => true, 'merge_siblings' => false),
array('title' => 'aside', 'block' => 'aside', 'wrapper' => true, 'merge_siblings' => false),
array('title' => 'section', 'block' => 'section', 'wrapper' => true, 'merge_siblings' => false),
)
)
);

$scriptOptions['style_formats_merge'] = true;

$options['tinyMCE']['default'] = $scriptOptions;

$doc->addScriptOptions('plg_editor_tinymce', $options);
Expand Down