? ?
avatar crystalenka
crystalenka
14 Dec 2022

Summary of Changes

This will be a familiar frustration for those who use templates in TinyMCE: inserting a template, and then not being able to get the cursor out of a block if it was nested or at the very end of the document, unless you inserted white space or other tags after too. That's not ideal.

This change enables an existing tinyMCE parameter, end_container_on_empty_block, which allows you to exit out of those blocks intentionally by pressing enter twice.

Testing Instructions

Open somewhere with an editor field. Toggle to turn off the editor and insert the following HTML (as the ONLY content):

<div class="parent" style="background-color: #ddd; padding: 1em;">
  <div class="child" style="background-color: #efefef; padding:1em;">
    <p>Text goes here.</p>
  </div>
</div>

Toggle the editor and turn it back on. Optionally enable block visibility for better understanding of which div you are in.

Then, try to use the arrow keys or enter key to get out of the child and parent divs.

Actual result BEFORE applying this Pull Request

You can't. You're stuck in the child div forever.

Expected result AFTER applying this Pull Request

Pressing enter twice exits the child div and you can enter content in the parent div.
Pressing enter another two times exits the parent div and you can now add text in the main editor without blocks.

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar crystalenka crystalenka - open - 14 Dec 2022
avatar brianteeman
brianteeman - comment - 14 Dec 2022

LGTM - please note the link to the tiny docs you gave is for tiny6 where this option is enhanced. The correct link for tiny5 is https://www.tiny.cloud/docs/configure/advanced-editing-behavior/#end_container_on_empty_block

avatar joomla-cms-bot joomla-cms-bot - change - 14 Dec 2022
Category Front End Plugins
avatar crystalenka crystalenka - change - 14 Dec 2022
The description was changed
avatar crystalenka crystalenka - edited - 14 Dec 2022
avatar crystalenka
crystalenka - comment - 14 Dec 2022

Thanks @brianteeman , updated it!

avatar crystalenka
crystalenka - comment - 14 Dec 2022

Has the build stuff broken? It's been pending a long time

avatar crystalenka crystalenka - change - 14 Dec 2022
Labels Added: ?
avatar coolcat-creations
coolcat-creations - comment - 18 Dec 2022

I tested this and it works like expected. I think it should be added to the documentation, though. (I dont see any test this button in issues.joomla.org) thats why I am only commenting.

avatar crystalenka
crystalenka - comment - 18 Dec 2022

@richard67 do you have any idea why there wouldn't be a "test this" button on the issues site? I can't confirm since I am the author

avatar richard67
richard67 - comment - 18 Dec 2022

@crystalenka A bug with the issue tracker which happens from time to time. The tracker treats the PR as if it was an issue and so doesn't show the button. Solution is either people report back their test result with a comment and we (maintainers or JBS) have a look on it and set it RTC when it has 2 tests reported in that way. Or you make a new PR and close this one.

avatar crystalenka
crystalenka - comment - 18 Dec 2022

Okay. Elisa tested it successfully, I'm not sure if @brianteeman or @wilsonge did?

avatar richard67
richard67 - comment - 18 Dec 2022

@crystalenka By the way: Is your cursor named Willy?

avatar coolcat-creations
coolcat-creations - comment - 18 Dec 2022

@crystalenka By the way: Is your cursor named Willy?

That joke took me too long, I would admit to.

avatar chmst
chmst - comment - 21 Dec 2022

Tested following the instruction and it works as described. We need a documentation for this change as it is not very known or self-explaining.

avatar crystalenka
crystalenka - comment - 21 Dec 2022

Thank you @chmst ! I am happy to document it but where?

avatar richard67 richard67 - change - 21 Dec 2022
Status New Ready to Commit
avatar richard67
richard67 - comment - 21 Dec 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39418.

avatar richard67
richard67 - comment - 21 Dec 2022

@chmst Assuming your comment above is a successful test, I have set RTC as that was the 2nd test.

avatar roland-d roland-d - change - 29 Dec 2022
Labels Added: ?
avatar roland-d roland-d - close - 29 Dec 2022
avatar roland-d roland-d - merge - 29 Dec 2022
avatar roland-d roland-d - change - 29 Dec 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-12-29 13:09:06
Closed_By roland-d
avatar roland-d
roland-d - comment - 29 Dec 2022

Thank you

Add a Comment

Login with GitHub to post a comment