[wp-hackers] TinyMCE and centered aligning
gamito at gmail.com
Wed Apr 23 09:43:53 GMT 2008
Thank you all for the kindness of your answers.
I ended up using this little hack.
On Tue, Apr 22, 2008 at 9:29 PM, Andrew Ozz <admin at laptoptips.ca> wrote:
> Mário Gamito wrote:
> > TinyMCE that comes with 2.5 uses <p style="text-align: center;"> to center
> stuff in the page. And that's the way it oughts to be.
> > Problem is my blog is aggregated into a planet that ignores this and
> there, centered text and images goes left.
> > Does anyone knows of a tiny hack to make the editor align things with <p
> align="center"> ?
> The easiest hack would be to add:
> content = content.replace(/<p style="text-align: center;">/g, '<p
> just above "// Pretty it up for the source editor" in
> If you need it to stick after upgrading WordPress, you'll need to make a
> small plugin for TinyMCE to do that when saving.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers