Forums / Setup & design / ezoe span tags

ezoe span tags

Author Message

Mads Ovesen

Friday 23 April 2010 8:58:28 am

Hi everyone,

Is there a way to prevent the online editor (ezoe) from removing span-tags, when I press 'send for publishing'? The reason is, that I want to add a text-color button to the editor. When I set a color the editor produces a span-tag with a style on it, which is removed again when I publish.

Thanks

/m

Peter Keung

Friday 23 April 2010 1:24:04 pm

You should implement it as a custom tag. So then your custom tag has an attribute "color" that you can output in the template as:

<span style="color: {$color};">{$content}</span>

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

Mads Ovesen

Saturday 24 April 2010 8:17:11 am

Yes, that is of course one solution, but not so user friendly. The custom tag is not obvious to users. And besides, the tinymce editor already has a text-color button, and does already produce the correct output. It is just a matter, that eZ publish removes thee tags. But if the custom tag is the only solution, I guess there is no other way around this problem.

/m

Nicolas Pastorino

Saturday 24 April 2010 9:19:52 am

Hi Mads,

Instead of a span, can't you make it a <div>, which is not removed on publishing, to which a CSS class is systematically applied, making the <div> an inline entity ?

Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Mads Ovesen

Thursday 29 April 2010 6:58:59 am

Hi,

Thank you Peter and Nicolas for your comments. I looked through the code, and I saw that the editor actually accepts span-tags, just only with very specifc style-attributes. For example the editor will convert <span style="font-weight:bold"> to <bold>. I could also add my styles here, with the risks this hack implies. Else i'll have to try the div solution.

/m

eZ debug

Timing: Jan 18 2025 04:11:04
Script start
Timing: Jan 18 2025 04:11:04
Module start 'content'
Timing: Jan 18 2025 04:11:05
Module end 'content'
Timing: Jan 18 2025 04:11:05
Script end

Main resources:

Total runtime0.9472 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 587.6016180.8516
Module start 'content' 0.00550.8147 768.4531604.7578
Module end 'content' 0.82020.1269 1,373.2109337.4063
Script end 0.9471  1,710.6172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4290210.0002
Check MTime0.00150.1612210.0001
Mysql Total
Database connection0.00070.077710.0007
Mysqli_queries0.875792.45552020.0043
Looping result0.00350.37312000.0000
Template Total0.923797.520.4619
Template load0.00230.242020.0011
Template processing0.921497.278020.4607
Template load and register function0.00020.020210.0002
states
state_id_array0.00070.076210.0007
state_identifier_array0.00090.093220.0004
Override
Cache load0.00180.1943200.0001
Sytem overhead
Fetch class attribute can translate value0.00140.145340.0003
Fetch class attribute name0.00130.139170.0002
XML
Image XML parsing0.00150.157640.0004
class_abstraction
Instantiating content class attribute0.00000.001670.0000
General
dbfile0.00250.2598340.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/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
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs