User tests: Successful: Unsuccessful:
Pull Request for Issue #46320
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:
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:
<field
name="editor1"
type="editor"
label="text editor 1"
height="900"
width="900"
/>
<field
name="editor2"
type="editor"
label="text editor 2"
height="900"
/>
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.
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
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration Language & Strings Repository NPM Change SQL Installation Front End Plugins |
| Labels |
Added:
Language Change
NPM Resource Changed
PR-6.0-dev
|
||
| Category | Administration Language & Strings Repository NPM Change SQL Installation Front End Plugins | ⇒ | Administration Language & Strings Repository NPM Change SQL Installation Postgresql Front End Plugins |
There is a bug in tinymce
Resizing the editor’s height would add a fixed width value.
https://www.tiny.cloud/docs/tinymce/latest/changelog/
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,
When should the values from the plugin settings be respected?
The priorities is following:
But because of #46320 (comment) the plugin never reach "plugin parameters"
So if no values are set in the form field the value of the tinymce config should be respected?
I'm now working on a solution so that when the form field editor is used, the width and height, if set, will be respected. If not defined, they will fall back to 100% width and 500px hight. The settings in the plugin will only reflect on the editor in the article edit.
Which is better? I guess 1...
So if no values are set in the form field the value of the tinymce config should be respected?
Yes, right. It already works like that, kind of.
To make it fully work it need to remove defaults from the editor field
joomla-cms/libraries/src/Form/Field/EditorField.php
Lines 208 to 209 in 508ac3d
But this can break editors sizing of existing installations.
@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,
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
| Title |
|
||||||
| Category | Administration Language & Strings Repository NPM Change SQL Installation Front End Plugins Postgresql | ⇒ | Administration Language & Strings Repository NPM Change SQL Installation Postgresql Libraries Front End Plugins |
Yes, that should work. Then this should go in to 6.1-dev. It changes the behavior.
Also need to revert changes in DisplayTrait.php because the same already exist a few line down
joomla-cms/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php
Lines 519 to 520 in b7d5d5a
| Title |
|
||||||
Please revert changes in DisplayTrait.php they are wrong.
The sizes already set from the parameters.
| Labels |
Added:
Updates Requested
PR-6.1-dev
Removed: PR-6.0-dev |
||
I reverted the two parameters
You reverted not enough 😉
This also need to revert https://github.com/RickR2H/joomla-cms/blob/9e7902f6c6ec2beecd73b1fcba56be1fb84e64db/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php#L79-L86
There already code that loading the parameters , and these changes only add a duplication 😉 .
Now looks good, thanks!
Your changes break possibility to set height per editor, when the form have multiple editors:
First field should be 200 by height and second field should be "plugin default" by height.