User tests: Successful: Unsuccessful:
See #14033
Issue reported here: #9812, #8591, #5820, #11851 and #8106
Some of the issues were closed because of the pull requests that came but later it was found out either they do not work or they are wrong(they modify default values).
This change fixes the problem while keeping the default values.
Please test all 3 use cases:
Use the following code to display a tinymce editor:
$editor = JEditor::getInstance('tinymce'); echo $editor->display('description', "", '250', '50', '60', '5', false);
Add a new article from backend of the site, try to edit this xml code https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_content/models/forms/article.xml#L27 , add width and height attributes (see https://docs.joomla.org/Editor_form_field_type for document about editor field type). For example, change it to;
<field name="articletext" type="editor" label="COM_CONTENT_FIELD_ARTICLETEXT_LABEL" description="COM_CONTENT_FIELD_ARTICLETEXT_DESC" filter="JComponentHelper::filterText" buttons="true" height="50" width="250" />
In the joomla backend go to extensions -> plugins -> tinymce editor -> advanced settings and modify width & height
Tinymce editor has height of 50pixels and width of 250pixels
Tinymce editor has height of 550pixels
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
Labels |
Added:
?
|
One problem remains: Width and height seems not to be per instance. i.e. using more than 1 editor field on a page can not have different width and/or height.
For another issue!
@DerinMavi
This should fix the instance issue - to add before line 151 in J4.0.
// Set custom width and height per instance
if ($width) {
$options['tinyMCE'][$fieldName]['width'] = $width;
}
if ($height) {
$options['tinyMCE'][$fieldName]['height'] = $height;
}
Hello, I am writing from the future, from the date of February 3rd, 2020. I see that the issue is open and we cannot still overwrite the existing height of the editor. Anything planned? Kind regards.
Anything new on this? Running into this issue now too on a component i built where i want a small height for the editor.
Seems just tests are missing so please test that this change here works and mark an successfull test. After two successfull tests this gets into RTC and than merged into the core. :-)
I tested but nr3 did not change anything for me in my custom component where i have multiple editors on screen and also not in the article content editor. I set height in the plugin settings to 900 but it stays at 500.
Also the affected lines are different nowadays. The instance issue from @schnuti worked just fine!
hmm seems we have a mix of different default values.
I have not yet understood why there is a different between html_height / html_width that come from the plugin options and height / width that come from the filed options.
In the other editor plugin (codemirror) it seems that height / width is ignored altogether as this seems to be the last mention of it in the plugin: https://github.com/joomla/joomla-cms/blob/3.9.21/plugins/editors/codemirror/codemirror.php#L191-L192
Labels |
Added:
?
?
Removed: ? |
I'v tested this pr and the height got completely ignored. Also test 3 didn't work as mentioned by @TLWebdesign. I made a new pr #37603 which should fix all situations mentioned here. So I'm closing this one. Please give #37603 a test or leave any feedback so we can get it fixed finally. Thanks for your participation.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-04-22 09:41:55 |
Closed_By | ⇒ | laoneo |
I have tested this item✅ successfully on 78de832
Tested as described + edited the code in J4.0 and tested with the same positive result.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26755.