michaellunsford Posted October 21, 2006 Share Posted October 21, 2006 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. Link to comment https://forums.phpfreaks.com/topic/24617-tinymce-anyone-aligncenter-versus-text-aligncenter/ Share on other sites More sharing options...
akitchin Posted October 21, 2006 Share Posted October 21, 2006 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. Link to comment https://forums.phpfreaks.com/topic/24617-tinymce-anyone-aligncenter-versus-text-aligncenter/#findComment-112141 Share on other sites More sharing options...
fenway Posted October 22, 2006 Share Posted October 22, 2006 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. Link to comment https://forums.phpfreaks.com/topic/24617-tinymce-anyone-aligncenter-versus-text-aligncenter/#findComment-112820 Share on other sites More sharing options...
michaellunsford Posted October 22, 2006 Author Share Posted October 22, 2006 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). Link to comment https://forums.phpfreaks.com/topic/24617-tinymce-anyone-aligncenter-versus-text-aligncenter/#findComment-112836 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.