Tinymce front-end: How to add css in head tag for iframe

For Joomla! 4.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderator: ooffick

Forum rules
Post Reply
eddyprosperi
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Jun 08, 2023 4:31 pm

Tinymce front-end: How to add css in head tag for iframe

Post by eddyprosperi » Thu Jun 08, 2023 4:45 pm

Hy there!

I developed a custom template in Joomla 4.

Now when I use the tinymce fronted editor and open any modal the XTD buttons the modals don't load the css and javascript resources in the template.
https://ibb.co/FVvQ008
What I'm trying to do is put a css file in the head tag of the iframe inside the modal. I've been going crazy for several days with this problem I hope someone can help me.
I tried overriding in
  • html/layouts/joomla/editors/buttons/modal.php
    html/layouts/libraries/html/bootstrap/modal/iframe.php
adding: add

Code: Select all

$doc    = JFactory::getDocument();
$doc->addStyleSheet(JURI::base( true ).'/templates/joomla-italia-theme/css/system-j4.min.css');
the file is inserted in the page header but not in the header of the iframe contained in the modal

In cassiopeia everything works correctly because the css and js files of the template are loaded both in the general head of the site and in the head tag of the iframe.

Can you help me or suggest?
Last edited by eddyprosperi on Thu Jun 08, 2023 5:01 pm, edited 1 time in total.

MarkRS
Joomla! Explorer
Joomla! Explorer
Posts: 282
Joined: Thu Oct 29, 2009 8:28 am
Location: UK

Re: Tinymce front-end: How to add css in head tag for iframe

Post by MarkRS » Thu Jun 08, 2023 4:58 pm

Does using (the far superior, and still free) JCE help?
It's a community, the more we all contribute, the better it will be.

eddyprosperi
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Jun 08, 2023 4:31 pm

Re: Tinymce front-end: How to add css in head tag for iframe

Post by eddyprosperi » Thu Jun 08, 2023 5:02 pm

I have the same problem with any editor even with JCE


Post Reply

Return to “Joomla! 4.x Coding”