[wp-hackers] Center in WP 2.7 with different code in the editor
elflop at googlemail.com
Wed Jan 14 13:50:08 GMT 2009
2009/1/14 Mário Gamito <gamito at gmail.com>:
> I've posed here this very same question a long ago in the WP 2.5 time.
> Wp 2.7 TinyMCE center aligns objects with <p style="text-align: center;">
> And that's fine and what it should be.
> The center code it recognizes unversaly is <p align="center"> which is
> kind of old-fashioned, but still does the job and above all, works well
> with Planet.
> When I asked here how to force WP 2.5 TinyMCE to center with <p
> align="center"> instead of <p style="text-align: center;">, someone
> "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
> And it worked.
Can this rather convulated system recognise class="" and apply things
Editing core files should be avoided. It might be better to look at
ways of adding to the tiny mce bar via a plugin - not sure if
would help here.
(I don't use tinymce)
my mind is on a permanent tangent
More information about the wp-hackers