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

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