-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[6.0] Fix TinyMCE editor not respecting width and height settings #46438
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
base: 6.0-dev
Are you sure you want to change the base?
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
|
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