[6.1] Fix TinyMCE editor not respecting width and height settings#46438
[6.1] Fix TinyMCE editor not respecting width and height settings#46438tecpromotion merged 15 commits intojoomla:6.1-devfrom
Conversation
|
Your changes break possibility to set height per editor, when the form have multiple editors: <field type="editor" name="text1" label="Text 1" width="100%" height="200"/>
<field type="editor" name="text2" label="Text 2" />First field should be 200 by height and second field should be "plugin default" by height. |
@Fedik I will check! Thanks for the feedback |
|
@Fedik When should the values from the plugin settings be respected? I'm now at the pont that values set in the editor field are respected when width and height are set in the field configuration. The article editor is not responding for now. |
|
@Fedik I could check for the $name in the display function in plugins\editors\tinymce\src\PluginTraits\DisplayTrait.php and load the values from the plugin settings when an article editor is active. |
|
There is a bug in tinymce Resizing the editor’s height would add a fixed width value. You should probably up date tinymce before debugging further |
|
@brianteeman is this something we have to do in an other PR? I've never updated TinyMCE, so could use some help if that is necessary, |
The priorities is following:
But because of #46320 (comment) the plugin never reach "plugin parameters" |
Which is better? I guess 1... |
Yes, right. It already works like that, kind of. joomla-cms/libraries/src/Form/Field/EditorField.php Lines 208 to 209 in 508ac3d But this can break editors sizing of existing installations. |
You would need to check with the maintainers if they will accept an update to TinyMCE in a patch release. I only mentioned it because at least from their changelog it is relevant to this PR. I wouldnt want you to waste time fixing a bug if its already been fixed |
Remove default values from thre editor field Use TinyMCE params when values are not set.
|
@Fedik I removed the default values from the EditorField. The default is now set when the editor is generated in thr DisplayTrait.php. Could this be a solution? |
|
Yes, that should work. Then this should go in to 6.1-dev. It changes the behavior. Also need to revert changes in joomla-cms/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php Lines 519 to 520 in b7d5d5a |
|
Thanks for all your work on this @RickR2H. Im going to move it straight to 6.1 as its already in alpha and it would be good to get it in soon and then tested |
|
Please revert changes in |
|
I have tested this item ✅ successfully on 753d221 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46438. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46438. |
|
@RickR2H please resolve the conflicts and then we can merge it. |
|
@tecpromotion Conflicts resolved. |
|
this breaks the diplay of mail templates |
|
@brianteeman I'll create a patch tomorrow. |
|
@brianteeman I've created a fix: #47305 |
|
thats not a fix thats a band aid |
|
@RickR2H check my comment about editor None #47292 (comment) About TinyMCE it still need an information from Brian, to confirm his type of installation. |
…ings (joomla#46438)" This reverts commit 7996a3f.
Pull Request for Issue #46320
Summary of Changes
This update improves the Joomla CMS TinyMCE editor plugin configuration and behavior consistency so the editor will respect the settings in the plugin configuration. The following changes have been implemented:
Testing Instructions
Check the descriptions in the TinyMCE plugin settings and verify that all fields display proper descriptions.
Open for example modules\mod_custom\mod_custom.xml and add the following code in the xml after the background image field:
Check in a custom HTML module is the editor fields now below the background image respect the width and height set in the field parameters.
Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed