Jump to content


Photo

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


  • Please log in to reply
3 replies to this topic

#1 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 21 October 2006 - 01:11 AM

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.

#2 akitchin

akitchin
  • Staff Alumni
  • Advanced Member
  • 2,516 posts
  • LocationCalgary, AB, Canada

Posted 21 October 2006 - 01:14 AM

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.

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 22 October 2006 - 09:15 PM

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.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#4 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 22 October 2006 - 09:33 PM

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).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users