-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow different buttons setup for tinyMCE #14417
Conversation
As this was done in 3.7 this is not a problem right? |
I couldn't find the PR for that, thanks for clearing this out |
@Fedik can you review the changes here? |
Is this ready for testing? |
Yup |
I have tested this item ✅ successfully on d8d404c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14417. |
I have tested this item ✅ successfully on d8d404c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14417. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14417. |
plugins/editors/tinymce/tinymce.php
Outdated
@@ -701,7 +701,7 @@ public function onDisplay($name, $content, $width, $height, $col, $row, $buttons | |||
$options['tinyMCE']['default'] = $scriptOptions; | |||
|
|||
$doc->addStyleDeclaration('.mce-in { padding: 5px 10px !important;}'); | |||
$doc->addScriptOptions('plg_editor_tinymce', $options); | |||
$doc->addScriptOptions('plg_editor_tinymce_' . $id, $options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid this is not compatible with subform,
There the id will be generated by JS, therefore the new editor instances (added in new row by JS) will not have any defined options while call Joomla.getOptions('plg_editor_tinymce_' + editor.id, {})
shall rtc be removed? |
yup, let's figure out another way for this |
back to pending This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14417. |
Would be great if it will be possible, i ran into this today :) 👍 |
@DGT41 could work, but still not perfect 😉 I think here need something like: // Load default:
if (empty($options['tinyMCE']['default'])) {
$options['tinyMCE']['default'] = array(/* default, general, params*/)
}
// Load changes for current name
$options['tinyMCE']['fieldName']['toolbar1'] = 'blabla'; |
@Fedik I know, but the other option needs a lot of refactoring and due to the legacy method is double work. We can postpone it for J4 when we will do the clean up. |
then you should note that adding
true, but current solution with I try to check more, this weekend, if will get some time 😉 |
there is a new PR #14520 |
Pull Request complimentary for Issue #14390 .
Summary of Changes
Pass different params for each instance of tinyMCE
Testing Instructions
In the global configuration select Tynimce as your default editor.
Create a new Editor custom field.
Select the Show Buttons as YES!
Select in the next input the buttons you want to hide.
Save the field.
Create a new article
Repeat the process but making Show Buttons as NO!
Expected result
Buttons behave according to the given input


Documentation Changes Required
This might not be B/C compatible (depending the tinyMCE introduced the Joomla.storageOptions)