Custom font color in online editor?

Author Message

Michal Slocinski

Tuesday 28 December 2010 11:40:08 am

Hi!

a customer has non-standard requirement to be able to select color of font in XML block when editing content via Online Editor.

I tried playing around with "style" extension of TinyMCE but it doesn't play nicely with eZ - it looks like all style modifications are forgotten after publishing an object.

Does anybody has some recommendation how to achive such goal? One option is to use custom tag but it's not very elegant IMO.

Bayron Guevara

Thursday 30 December 2010 6:59:52 am

You can look up the file extension/ezoe/design/standard/javascript/themes/ez/editor_template.js. This is a custom theme implemented by eZPublish for the TinyMCE's controls. As I see you could use forecolor, forecolorpicker to specific the font color and related to the font size here is fontsizeselect.

I've never used these controls, but you can give them a chance. Place the above identifiers inside a ezoe.ini override, in the param [EditorLayout]Buttons

Web Developer & Modern Philosopher
Visit http://www.laprensa.hn, http://www.diez.hn, http://www.estilo.hn

Peter Keung

Thursday 30 December 2010 9:03:32 am

We've done something in between: a custom tag plus a custom button that pulls up a dialog only for that custom tag.

As for creating a custom button, you can follow the examples of some of the other plugins in extension/ezoe/design/standard/javascript/plugins to create your own plugin containing the button(s) (and then add the new button(s) to [EditorLayout]Buttons that Bayron refers to above).

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

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 18 2025 02:58:01
Script start
Timing: Jan 18 2025 02:58:01
Module start 'layout'
Timing: Jan 18 2025 02:58:01
Module start 'content'
Timing: Jan 18 2025 02:58:02
Module end 'content'
Timing: Jan 18 2025 02:58:02
Script end

Main resources:

Total runtime0.8750 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.0156152.6250
Module start 'layout' 0.00620.0032 740.640639.4531
Module start 'content' 0.00940.8640 780.0938580.7188
Module end 'content' 0.87340.0015 1,360.812512.1563
Script end 0.8749  1,372.9688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3778160.0002
Check MTime0.00140.1593160.0001
Mysql Total
Database connection0.00100.111210.0010
Mysqli_queries0.821293.8538590.0139
Looping result0.00050.0608570.0000
Template Total0.842096.220.4210
Template load0.00220.254320.0011
Template processing0.839795.969320.4199
Template load and register function0.00020.024410.0002
states
state_id_array0.00120.132210.0012
state_identifier_array0.00080.094720.0004
Override
Cache load0.00180.2093190.0001
Sytem overhead
Fetch class attribute can translate value0.00040.049430.0001
Fetch class attribute name0.00150.168750.0003
XML
Image XML parsing0.00270.309330.0009
class_abstraction
Instantiating content class attribute0.00000.001050.0000
General
dbfile0.00450.5188240.0002
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs