We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1199
    • 3 Posts
    Hi guys,

    I’m sure this has been asked before, but I’ve been unable to find an answer that i understood. I’m using ModX for the first time, and so-far enjoying it as i work out the internal logic of the software.

    When someone adds an image to text and wishes it to float it left or right i would like to be able to define this in my CSS file and simply use a Class so that i can be in control of margins, padding, borders etc... the default behaiour of tinyMCE is to use style="float:left;.

    Where do i edit this behavior? is it through the ModX manager interface, or do i go deeper into the TinyMCE plugin folder etc...?

    Cheers,
      • 26016
      • 561 Posts
      Hi,
      That’s interesting. My Tiny editor, in both Revo and Evo, does apply a class when I use what I will call the word processor alignment buttons. I get "justifyright", "justifyleft", or "justifyfull" classes with those buttons, which I can style any way I want to. The only time I get an inline style is when I choose the centering one, which gives me the usual "margin: 0 auto;", which is good for me.

      I looked at my Tiny configuration, and I didn’t see any obvious way to change that.

      Any chance you’re using an out-of-date version of Tiny? (or even may be FCK instead of Tiny?) That could be it. In that case, I would just say you could update Tiny, but if you’ve got anything customized in there, you’ll want to do that carefully. Then again, lately with Revo I’m seeing that people are having all kinds of trouble upgrading Tiny for various reasons.

      Oh, and even if you don’t want to upgrade, you can apply a class to any image you’ve put in a document by doing Insert/Edit Image... Appearance tab... and add your class. Kind of clunky, but it works. You can also do that as you’re selecting an image to put into a document.

      Cheers, Dave
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4