[wp-hackers] TinyMCE and centered aligning

Mário Gamito gamito at gmail.com
Wed Apr 23 09:43:53 GMT 2008


Hi,

Thank you all for the kindness of your answers.
I ended up using this little hack.

Warm Regards,
Mário Gamito

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
> align="center">');
>
>  just above "// Pretty it up for the source editor" in
> wp-admin/js/editor.js.
>
>  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
>  http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list