User tests: Successful: Unsuccessful:
Pull Request for #9812, #8591, #5820, #11851 and #8106.
The TinyMCE editor forces the plugin width and height instead of using the dimensions from the editor itself. This editor fixes it.
Test 1:
echo JEditor::getInstance('tinymce')->display('description', '', '', '', '60', '5', false);
Test 2:
echo JEditor::getInstance('tinymce')->display('description', '', '450', '400', '60', '5', false);
Test 3:
buttons="true" height="370" width="380"
Test 1:
Dimensions are 200x300.
Test 2:
Dimensions are 200x300.
Test 3:
Dimensions are 200x300.
Test 1:
Dimensions are 200x300.
Test 2:
Dimensions are 450x400.
Test 3:
Dimensions are 370x380.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Front End Plugins |
There is no point in this pr as it's changed in tinymce 6
sorry this bit stays the same I misread the hcanges and the new docs were not published at the time
Title |
|
There is no point in this pr as it's changed in tinymce 6
What has changed? Do you see the problem this pr addresses?
I am aware of the problem this addresses and I am trying to save you time as I am also aware of the changes in tinymce 6 and that at least one of the changes is directly related to the editor dimensions
Do you have a link to the change?
Sorry, this not going to work :
joomla-cms/libraries/src/Editor/Editor.php
Lines 153 to 154 in 9a5a778
Note: (px or %)
Not that easy, and that probably a reason why this bug live so long ;)
We can probably drop % part, if it will work safely
https://www.tiny.cloud/docs/configure/editor-appearance/#height
If it is a number then tinymce assumes it is px
If it is a string then tinymce uses the units
omg we've all missed the obvious new pr incoming
omg we've all missed the obvious new pr incoming
Which one?
@Fedik actually this works fine with both % and px. We do not need to have any of the lines with the is_numeric check as tinymce automatically sees a number as px without us adding anything
html_height
= is_numeric($html_height) ? $html_height . 'px' : $html_height;
so all that is needed is to change
$html_height = $this->params->get('html_height', '550');
$html_width = $this->params->get('html_width', '');
$html_width = $html_width == 750 ? '' : $html_width;
$html_width = is_numeric($html_width) ? $html_width . 'px' : $html_width;
to
$html_width = $width ?: $this->params->get('html_width', '');
$html_height = $height ?: $this->params->get('html_height', '550');
and we can also delete lines 68 and 69 as they are not needed
I did that in this pr, or is there something missing?
Labels |
Added:
PBF
|
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
r2c
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-05-17 18:47:08 |
Closed_By | ⇒ | bembelimen | |
Labels |
Added:
?
|
Thx
@laoneo I am a bit confused by the title of this PR, which starts with "[4.2]" while target branch is 4.1-dev. What is right?