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 Offline

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

Please create a new Ticket and we will get back to you as soon as we can.

#112334 Text color attributes with Gantry 5

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 CarolHaynes on Friday, 18 November 2022 13:56 GMT

CarolHaynes
Hi I am using Gantry 5 to generate Joomla templates but one thing I have noticed is that if I use text colours from JCE in article editor the attributes are added to the HTML correctly but they are no rendered on the front end - they just come out in standard text colour.

How can I change this behaviour so that specific colours chosen in the editor are actually displayed correctly?

Ryan
Please post a link to an example article.

Ryan Demmer

Lead Developer / CEO / CTO

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

CarolHaynes
I am upgrading a site from Joomla 3 to 4 but in the process had to change template as the J3 template was not upgradable.

I have a page of poetry with initials highlighted

Here is the J4 link (work in progress)

https://www.tanya.lairdswood.com/poems


Compare to the J3 original version

https://www.tanyaanisimova.com/poems

hardys
This is caused by a rule in your CSS file

h1, h2, h3, h4, h5, h6, strong {
    color: #4d4d4d;
}

CarolHaynes
Thanks

I know its not related to JCE but any idea how to override a CSS file? I don't want to edit the main file as updates will overwrite it.

Ryan
See this - https://docs.gantry.org/gantry5/tutorials/adding-a-custom-style-sheet and in the custom css file add:

strong {
    color: inherit;
}
Alternatively apply the Bold to the text first, then the color.

Ryan Demmer

Lead Developer / CEO / CTO

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

Ryan
You can also use css to apply a style to the first letter in a paragraph. Edit the Poems menu item, and add the Page Class value of poems in the Page Display tab. Then add the following to the custom css file:

.poems p:first-letter,
.poems h3:first-letter  {
    color: red;
    font-weight: bold;
}

Ryan Demmer

Lead Developer / CEO / CTO

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

CarolHaynes
Thank you - that's really helpful