Online Editor - Center embeded image in editor

Author Message

STEVO +

Monday 03 August 2009 6:14:24 am

Only me again!

I've noticed that images with view="embed" aren't shown as centered in the editor if the align center button is used.

I've hacked a solution (for firefox 3.5 at least) with these css3 rules.

*[view="embed"]{display:block;}
img[view="embed"][align="middle"]{margin-left: auto; margin-right:auto;}

This will probably do for my case but I think it deserves looking at.

I think that any content (even images) with view="embed" should have display:block; in the editor, otherwise their preview behaves like embed-inline.

They centering is a bit trickier. At the moment, the js adds align="middle" to all image tags, i think it should only use "middle" for embed-inline. however, using align="center" won't help the preview either.

Any comments anyone?

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 05:20:33
Script start
Timing: Jan 18 2025 05:20:33
Module start 'layout'
Timing: Jan 18 2025 05:20:33
Module start 'content'
Timing: Jan 18 2025 05:20:34
Module end 'content'
Timing: Jan 18 2025 05:20:34
Script end

Main resources:

Total runtime0.6384 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0118 591.0078152.6406
Module start 'layout' 0.01180.0034 743.648439.4766
Module start 'content' 0.01520.6219 783.1250438.2734
Module end 'content' 0.63710.0013 1,221.39848.1250
Script end 0.6384  1,229.5234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4767160.0002
Check MTime0.00130.2023160.0001
Mysql Total
Database connection0.00100.163110.0010
Mysqli_queries0.598693.7693460.0130
Looping result0.00040.0662440.0000
Template Total0.601894.320.3009
Template load0.00210.326620.0010
Template processing0.599793.932420.2998
Template load and register function0.00010.016010.0001
states
state_id_array0.00110.172510.0011
state_identifier_array0.00090.137520.0004
Override
Cache load0.00170.2696120.0001
Sytem overhead
Fetch class attribute can translate value0.00050.071910.0005
Fetch class attribute name0.00060.086920.0003
XML
Image XML parsing0.00050.083810.0005
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00080.1177160.0000
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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs