You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Online

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

#112484 Site CSS not used in the editor

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by StefanS on Wednesday, 25 January 2023 18:41 GMT

StefanS
Hi there,

I have set 'Editor Styles' to 'Template CSS File', but the editor doesn't seem to use the CSS.
I have a T4 Framework Template with some individual adjustments.

How can I get my editor WYSIWYG?

Stefan

Ryan
Does the Styles list in the editor toolbar contain any values?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

StefanS
Yes, lots of stales (I gues the standard T4 styles), but none of my custom defined styles)
It doesn't show my colors nor fonts.

Ryan
In the templates css folder, create a new file called editor.css, and add the following:

@import url('template.css');
@import url('theme.css');
The editor will load this editor.css file to style the editor content, and this should include your changes.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

StefanS
coming closer...
fonts are now OK, colors still missing.
colors are defined within T4 with the configuration menues. Don't know where they are stored.

Ryan
colors are defined within T4 with the configuration menues. Don't know where they are stored.


These are stored in media/t4/css but the editor should be loading all the required files automatically without the need for the editor.css file I suggested above.

Which version of JCE Pro do you have installed?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

StefanS
2.9.32

StefanS
BTW: the font in the editor is extremely small (much smaller than on the site) . Is it possible to zoom the editor content?

Ryan
Please send me a login - https://www.joomlacontenteditor.net/contact/site-login

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Ryan
I have fixed this on your site by renaming the editor.css file to editor-fonts.css, and adding an import rule for the OpenSans font your are using on your site.
I then configured the "Default" profile to load this editor-fonts.css file (this is done in Editor Profiles -> Editor Parameters -> Typography), in addition to the template's css files, which the editor is doing automatically.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

StefanS
coming ever closer...

Thank you so far!
Looks much better now, AND - the text-colors are still missing. All my headings should be #008ba3
Can this be fixed too?

Ryan
Those styles were in your custom.css file, which I have added for loading in Editor Profiles -> Editor Parameters -> Typography.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

StefanS
Looks great now!

Thank you for your support!

Another little thing: I'd like to use the editor to edit my articles directly in the frontend.
Problem is, when I log into the frontend, I only see the little editing-icon with modules, neither with categories or articles.
Any hint, how this can be solved?
https://stefan-schoch.de/kontakt/login.html

Ryan
Problem is, when I log into the frontend, I only see the little editing-icon with modules, neither with categories or articles.


This is a Joomla Article Manager setting. Go to Content -> Articles and click on the Options button, then on the Permissions tab. Check that the usegroup required has the correct permissions set to for editing.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

StefanS
I'm logged in as super-admin, so I assume I have all permissions?
In the options it says that I have.

You can try yourself with the support-account: https://stefan-schoch.de/kontakt/login.html

Is there any other setting in the JCE or perhaps in the template that might hide these buttons?

StefanS
Password for suer 'support' was changed, I sent the new one via the 'site login' form.

Ryan
Is there any other setting in the JCE or perhaps in the template that might hide these buttons?


This is not under JCE control, but may be affected by your template, if there are template overrides in place.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

StefanS
Hey there,

recently I installed the Google fonts locally on my server (German GDPR issue), and now the font is not correct in the editor (I see Times Roman instead of Open Sans).

How can we tell JCE to use the local fonts?

Stefan

Ryan
In the editor.css file, at the top of the file, add font-face rule for the fonts, eg:

@font-face {
  font-family: 'open-sans-v34-latin-regular';
  src: url('../fonts/open-sans-v34-latin-regular.woff2';
}

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

StefanS
That works, thank you!
Only there is a closing bracket missing, but fortunately I had a spare one! ;-)