Forums / General / How to center a text in online editor

How to center a text in online editor

Author Message

christian bencivenni

Tuesday 31 March 2009 7:43:17 am

Someone can help me to solve this without template override?

Gabriel Finkelstein

Tuesday 31 March 2009 10:23:25 am

You have to add a custom class for the paragraph tag.
In content.ini from both your admin and public siteaccess add:

[paragraph]
AvailableClasses[]
AvailableClasses[]=textCenter

And then in your stylesheet:

p.textCenter {
   text-align:center;
}

André R.

Tuesday 31 March 2009 1:29:47 pm

In 4.1 you have support for alignment out of the box on paragraph|table|td|th|custom|embed tags, so you will not need the above code to accomplish alignment(but it will work there as well, just not inside editor unless you define that css in editor .css file).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Neo Pixel

Friday 03 April 2009 1:29:30 am

I still don't see why "align text left" "align text center" & "align text right" isn't standard functionality in the online editor...

Three buttons in a row is what you get with word, so what's the problem?

Apart from that and other minor problems, ezpublish is the best cms I've used :-)

Asking stupid questions so you don't have to!

André R.

Friday 03 April 2009 6:29:52 am

I answered this in another forum post, the buttons are there, just not enabled by default in OE 5.0.0, this is fixed in next version of OE witch will be bundled with eZ Publish 4.1.1.

If you use 4.1.0, look in ezoe.ini for how to enable them yourself.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Neo Pixel

Monday 06 April 2009 6:22:12 am

Great stuff! :-)

Is OE 5.0.0 compatible with 4.0.X ???

Asking stupid questions so you don't have to!

André R.

Monday 06 April 2009 7:26:03 am

Yes, but the alignment is not(so disabled if you install on 4.0.x).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Anca Grozea

Thursday 09 April 2009 7:01:37 am

Thank you Gabriel!
Very useful post!

Have a nice day!
Anca

eZ debug

Timing: Jan 30 2025 19:47:33
Script start
Timing: Jan 30 2025 19:47:33
Module start 'content'
Timing: Jan 30 2025 19:47:33
Module end 'content'
Timing: Jan 30 2025 19:47:34
Script end

Main resources:

Total runtime0.2622 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 587.9453370.2969
Module start 'content' 0.00750.0116 958.24221,009.6250
Module end 'content' 0.01920.2430 1,967.86723,897.3359
Script end 0.2622  5,865.2031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00491.8513200.0002
Check MTime0.00140.5392200.0001
Mysql Total
Database connection0.00110.408010.0011
Mysqli_queries0.166563.48051410.0012
Looping result0.00140.54841390.0000
Template Total0.242692.510.2426
Template load0.00080.316510.0008
Template processing0.241792.170710.2417
Override
Cache load0.00060.214310.0006
Sytem overhead
Fetch class attribute can translate value0.00190.706210.0019
XML
Image XML parsing0.00030.101510.0003
General
dbfile0.00411.5590200.0002
String conversion0.00000.001530.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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