User tests: Successful: Unsuccessful:
Tinymce in its current implementation is not a true wysiwyg editor for the cassiopeia template as it is not aware of the cassiopeia css. This can severely restrict what people think is possible with tinmyce and creates confusion that what they edit doesn't match what is displayed.
By default tinymce will look for the presence of an editor.css file in the site template and load the classes from that. Prior to this PR the only thing in that file was some internal classes. This PR creates a true editor.css file for the cassiopeia template. It is generated by the editor.scss file which is a subset of the template.scss which keeps the size down.
One downside of adding this editor.css is that tinymce in its current configuration will display all the classes in one long list on the formats menu/button. Therefore I have changed the default behaviour to NOT display the list (the css is still loaded) and added a new configuration option (default is off) that will let you turn it on if you want. This means that there is a small b/c break so documentation will be created.
As this is an scss change you will need to either run npm build:css
or use one of the pre built packages.
The eaisest thing to check would be to edit the typography article of the sample data.
also check the Display-1 text at the bottom of the file
This pr works just the same on the frontend where perhaps it is a more obvious improvement.
Please select:
Documentation link for docs.joomla.org: https://docs.joomla.org/Chunk4x:Extensions_Plugin_Manager_Edit_Editor_Group/en will be updated once merged
No documentation changes for docs.joomla.org needed
No documentation changes for manual.joomla.org needed
Category | ⇒ | Repository NPM Change |
Status | New | ⇒ | Pending |
Labels |
Added:
NPM Resource Changed
PR-5.0-dev
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-06-11 17:17:53 |
Closed_By | ⇒ | brianteeman |
Title |
|
Category | Repository NPM Change | ⇒ | Administration Language & Strings Repository NPM Change Front End Plugins |
Status | Closed | ⇒ | New |
Closed_Date | 2023-06-11 17:17:53 | ⇒ | |
Closed_By | brianteeman | ⇒ |
Status | New | ⇒ | Pending |
Labels |
Added:
Language Change
|
@brianteeman Can it be that the before and after PR videos for the frontend are mixed up?
they were indeed. I have corrected the posrt - thanks
Why is now ok to load 1000 lines of code into the editor.css?
because if you dont then you dont have a wyiwyg editor
Yes but what has changed between #31828 (comment) and now?
Your quote:
There is absolutely no way that an editor.css should be over 1000 lines!!
Because
Couple of things here:
@import
statement at the beginning of the file pointing to the template.css (so the editor has only the TinyMCE related code, easier to edit)In short, this is not a complete solution, and once again the claim WYSIWYG is by approximation...
Could you explain the first point please. My understanding is that if you simply import the entire template css then the editor has all the css. The intention here was to only include the minimum
My understanding is that if you simply import the entire template css then the editor has all the css.
Nope, that not what's happening in reality. You hard code:
joomla-cms/templates/cassiopeia/index.php
Lines 48 to 65 in a8be6ef
joomla-cms/templates/cassiopeia/index.php
Lines 72 to 80 in a8be6ef
joomla-cms/templates/cassiopeia/index.php
Lines 40 to 42 in a8be6ef
but then you are still importing hundreds of lines of css that are not relevant to the editor. That is what I was aiming to avoid
Am I being really daft or is the inline style for the color complletely wrong. There is no way in cassiopeia to set those colours. That is a functionality only present in Atum
Thanks to others for pointing out when those inline color styles are used ie when using the media manager in the frontend. So definitely not needed in the editor.css
Thanks to others for pointing out when those inline color styles are used ie when using the media manager in the frontend. So definitely not needed in the editor.css
Still, this approach is completely ignorant of the colours, fonts:
joomla-cms/templates/cassiopeia/index.php
Lines 40 to 42 in a8be6ef
But most importantly, for me, it's a monkey patch if you try to emulate the styles ignoring that almost every template out there has some params that control aspects of the styling and therefore can only be done using PHP.
This is only for cassiopeia not for any other template!
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-09-08 12:05:10 |
Closed_By | ⇒ | brianteeman |
@brianteeman Can it be that the before and after PR videos for the frontend are mixed up?