Support » Themes and Templates » VIsual Editor change “align left” to “class left”?

  • Hi all,

    I would like to have a bit more control over the Visual Editor, if it is possible. Basically, when people press the buttons to align text left or right or center, I would like it to give a class to the element, instead of the align=”left” or align=”right” property.

    This would basically give me more control with elements such as images, so you could add padding on the right when they are aligned left and vice-versa.

    So, if someone clicks the text-align left button, I would like it to give a class of left (class=”left”), then I could asign whatever I want to that class.

    Is that possible?


Viewing 7 replies - 1 through 7 (of 7 total)
  • Am I dreaming?! Is it not possible?!

    Anyone got an idea on this?!

    This requires changing the wordpress core code which is not recommended [because any future upgrade of wordpress, will overwrite your changes]. you would probably need some kind of a plugin that attaches itself to the visual editor.

    The VRE is also an outside script – TinyMCE. You can go to the TinyMCE site – they have available plugins and such that you can add to the script if you like.

    Hi Doodlebee,

    I found your post here where you talk about editing the Javascript. It didn’t seem to work for me.

    Not to worry though, I have been on the TinyMCE forums and I don’t seem to be having much luck. What is the VRE? I am a bit new to all this. If you could point me any closer to where you think the appropriate script might be, I would be extremely grateful.

    Thanks for your replies both of you, I have been trying to figure this out all day and I am tearing my hair out over it!

    Sadish, I don’t think I’ll need to worry about upgrading too much as I am building this for a client. Thanks for your response.


    I found your post here where you talk about editing the Javascript. It didn’t seem to work for me.

    Sorry Desmondo, but perhaps you should have read what I said…

    “I’d stop using the Visual Rich editor. Use the WordPress quicktags that are default, and you can add buttons to your liking easily, or just manually add stuff in.”

    Which means the solution I provided in that thread was to turn off the VRE and use the WordPress default quicktags. That’s *not* what you are looking to do, therefore, my solution *won’t* work for you. Mine is about the quicktags, not the VRE stuff, which is run by Tiny MCE.

    What is the VRE?

    Visual Rich Editor – or what you call a WYSIWYG – what you’re asking about.

    As for *where* the script is for TinyMCE, I don’t know. I never use the VRE – can’t stand the thing. I shut it off every time.

    OK, got you now Doodlebee, thanks for your reply.

    I could do without the VRE, but unfortunately the client won’t be able to.

    Thanks again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘VIsual Editor change “align left” to “class left”?’ is closed to new replies.