Jump to content

Archived

This topic is now archived and is closed to further replies.

michaellunsford

tinyMCE anyone? align="center" versus text-align:center;

Recommended Posts

having some trouble getting the align features to use CSS instaed of <div align="center">. I have inline_styles set to true -- but it doesn't help.

If I disallow the "align" feature for div, then try to center something, it will center, but then pop-back to normal after I save. I'm guessing the center button is programmed to use align instead of CSS text-align. So I press the button and it uses the "illegal" code. Then when the editor realizes there's illegal code, instead of fixing it, it just deletes it.

Any ides would be great.

Share this post


Link to post
Share on other sites
although it isn't a happy solution, you could add a custom centering style to the list of pre-made styles/classes and use that rather than their centering button.

Share this post


Link to post
Share on other sites
Centering is a royal pain in the butt... basically, only things with widths can have centering, and you have to make sure the margins are defined... it's complicated.

Share this post


Link to post
Share on other sites
Really all I have to do is change the align="center" to style="text-align:center" and it works. If tinyMCE is yet another designMode() utility, then there's no source code to change -- I'd have to find the conversion utility it uses for other things (like the <font> tag).

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.