? ? No Code Attached Yet
avatar Scrabble96
Scrabble96
6 Jan 2022

Problem identified

Tinymce, which is shipped in Joomla core, uses the Cassiopeia css for all its styling on the front end. It is the same in J3, too, using Protostar CSS. This means if you write your own template you have to copy the relevant Joomla default site template CSS or write new CSS into your own template.

Proposed solution

Use Joomla Core admin CSS to style Tinymce on the front end.

Open questions

avatar Scrabble96 Scrabble96 - open - 6 Jan 2022
avatar joomla-cms-bot joomla-cms-bot - change - 6 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Jan 2022
avatar dgrammatiko
dgrammatiko - comment - 6 Jan 2022

You can override the css per template

avatar Scrabble96
Scrabble96 - comment - 7 Jan 2022

You can override the css per template

I have done that manually, as I said in the original post, but it means going back and forth from inspecting Cassiopeia layout and copying CSS, adding it to the new template CSS and then checking it in the new layout. A bit of a pain. There is a JCE template override for the pop-up, but that's no use if not using JCE.

Rather than using admin CSS, could the tinymce have its own CSS in the templates > system folder?
Or perhaps its own template override?

avatar dgrammatiko
dgrammatiko - comment - 7 Jan 2022

You can use this: https://wysiwyg.dgrammatiko.dev

It will give you way better results, actual WYSIWYG, from the core or any other 3rd PD editor

avatar Scrabble96
Scrabble96 - comment - 7 Jan 2022

Oops. I've just found the Joomla > Layouts > Tinymce but all it does is create an empty folder. I shall add a CSS file and test it now.

It would be more useful if it included the CSS in the override.

avatar dgrammatiko
dgrammatiko - comment - 7 Jan 2022

Do you want to style tinyMCE or the content inside the editor?

avatar brianteeman
brianteeman - comment - 7 Jan 2022

Joomla > Layouts > Tinymce

That is not for css!!

See https://www.youtube.com/watch?v=OyZQ63Ahnt4&ab_channel=LearnJoomla4

avatar Scrabble96
Scrabble96 - comment - 7 Jan 2022

tinyMCE's own layout. This is because my template didn't include 'modal' CSS as I don't use modals anywhere, so the initial view is like this:
tinymce-1

avatar Scrabble96
Scrabble96 - comment - 7 Jan 2022

Joomla > Layouts > Tinymce

That is not for css!!

See https://www.youtube.com/watch?v=OyZQ63Ahnt4&ab_channel=LearnJoomla4

Yes, I watched that yesterday and saw it's for text snippets and templates, but thought it might work for CSS, too.

avatar dgrammatiko
dgrammatiko - comment - 7 Jan 2022

so the initial view is like this:

Where's the editor in that view?

avatar Scrabble96
Scrabble96 - comment - 7 Jan 2022

tinymce-2

avatar dgrammatiko
dgrammatiko - comment - 7 Jan 2022

Go to http://skin.tiny.cloud/t5 and create a custom skin
Then place it in your template CSS folder (IIRC)

avatar Scrabble96
Scrabble96 - comment - 7 Jan 2022

Go to http://skin.tiny.cloud/t5 and create a custom skin Then place it in your template CSS folder (IIRC)

Thank you @dgrammatiko - I'll give that a try.

avatar brianteeman
brianteeman - comment - 7 Jan 2022

NO!!!

You're talking at cross purposes

This is NOTHING to do with tinymce!!

This is not tinymce layout!!!

Your issue is to do with the styling of the modals for the xtd-editor plugins - to confirm that just disable all the xtd-editor plugins and they will disappear

avatar Scrabble96
Scrabble96 - comment - 7 Jan 2022

Ok. ok. Perhaps the xtd-editor modals plugins CSS could be added to System CSS then?

avatar dgrammatiko
dgrammatiko - comment - 7 Jan 2022

You can style the XTD by adding CSS to the layouts/joomla/editors/buttons/button.php and layouts/joomla/editors/buttons/modals.php.

avatar brianteeman
brianteeman - comment - 7 Jan 2022

This is because my template didn't include 'modal' CSS as I don't use modals anywhere, so the initial view is like this:

If you are using frontend editing and the xtd-editor plugins then you ARE using modals

avatar Quy Quy - change - 21 Jan 2022
Title
[4.0] Request for comment re Tinymce front-end css
[4.0] [RFC] Tinymce front-end css
avatar Quy Quy - edited - 21 Jan 2022
avatar joomla-cms-bot joomla-cms-bot - change - 21 Jan 2022
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Jan 2022
avatar Hackwar Hackwar - change - 17 Feb 2023
Labels Added: ?
avatar Hackwar Hackwar - labeled - 17 Feb 2023
avatar pcrt
pcrt - comment - 8 Jun 2023

You can style the XTD by adding CSS to the layouts/joomla/editors/buttons/button.php and layouts/joomla/editors/buttons/modals.php.

In my custom template:
How do I insert a css file in the head tag of the iframe?
I put in the modal.php file:

$doc = JFactory::getDocument();
$doc->addStyleSheet(JURI::base( true ).'/templates/joomla-italia-theme/css/system-j4.min.css');

not work

Add a Comment

Login with GitHub to post a comment