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
[4.1] TinyMCE should prefer the editor dimensions and fallback to the plugin params #37603
Conversation
@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? |
sorry this bit stays the same I misread the hcanges and the new docs were not published at the time |
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? |
New issue in the list of issues fixed by this PR see #37723 . |
Sorry, this not going to work : joomla-cms/libraries/src/Editor/Editor.php Lines 153 to 154 in 9a5a778
Note: 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 |
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
so all that is needed is to change
to
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? |
@laoneo you just need to delete the 4 lines with isnumeric as they are not needed |
I have tested this item ✅ successfully on 177c2ef This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37603. |
1 similar comment
I have tested this item ✅ successfully on 177c2ef This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37603. |
r2c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37603. |
Thx |
Pull Request for #9812, #8591, #5820, #11851 and #8106.
Summary of Changes
The TinyMCE editor forces the plugin width and height instead of using the dimensions from the editor itself. This editor fixes it.
Testing Instructions
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"
Actual result BEFORE applying this Pull Request
Test 1:
Dimensions are 200x300.
Test 2:
Dimensions are 200x300.
Test 3:
Dimensions are 200x300.
Expected result AFTER applying this Pull Request
Test 1:
Dimensions are 200x300.
Test 2:
Dimensions are 450x400.
Test 3:
Dimensions are 370x380.