How to change color of text ? Custom style.

Author Message

Martynas Bilevičius

Sunday 30 March 2008 12:01:00 am

Hello. I want add some custom styles in Online Editor where is Heading 1. Is that possible?
The aim of that is to add a possibility to change color of text. Or is there another way how I can do that?

Calvin Liu

Sunday 30 March 2008 3:11:01 am

maybe you can define it in your external css file.

Martynas Bilevičius

Sunday 30 March 2008 10:30:34 pm

Yes i know that i can add new style class in css, but how to add new style class to Online Editor. One of way is creat custom tag, but i fink that it is not dificult to use it for me but for simple user i fink it is to difucult. So maybe it is simple way change text color.

Martynas Bilevičius

Tuesday 01 April 2008 10:04:07 pm

So how is the best way change text color in Online Editor. It is in possible add new styles?

Mark Marsiglio

Wednesday 02 April 2008 4:59:43 am

Yes, you can add new styles for any of the existing tags in the OE. Look at the content.ini for examples. Then add your new options in content.ini.append.php for your siteaccess and admin siteaccess.

Once you do, you can right click on any element for which you have allow custom classes and select "Properties". From there you can set the class.

When you preview and publish the content, it will be published like this: <p class='yourcustomclassname"> (if you added a custom class called 'yourcustomclassname' to the <paragraph> tag in content.ini

If you want the color to show up in the OE, you have to add your class to the editor.css in the ezdhtml extension design folder.

The downside of this is that you cannot apply color to only one part of a tag element (i.e. a few words in the middle of a paragraph) unless you created a custom class for the the bold or italic tag which used css to make it not bold, but a color instead.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 04:31:31
Script start
Timing: Jan 31 2025 04:31:31
Module start 'layout'
Timing: Jan 31 2025 04:31:31
Module start 'content'
Timing: Jan 31 2025 04:31:31
Module end 'content'
Timing: Jan 31 2025 04:31:31
Script end

Main resources:

Total runtime0.0135 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.2656151.2266
Module start 'layout' 0.00530.0022 739.492236.6797
Module start 'content' 0.00750.0049 776.171994.1875
Module end 'content' 0.01240.0011 870.359433.9922
Script end 0.0135  904.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002418.0019140.0002
Check MTime0.00117.9973140.0001
Mysql Total
Database connection0.00085.743310.0008
Mysqli_queries0.002115.552330.0007
Looping result0.00000.081110.0000
Template Total0.00096.410.0009
Template load0.00075.167110.0007
Template processing0.00021.228310.0002
Override
Cache load0.00053.785410.0005
General
dbfile0.00139.694480.0002
String conversion0.00000.049340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs