We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23299
    • 1,161 Posts
    I see this interesting thread: http://modxcms.com/forums/index.php/topic,15803.0/topicseen.html

    Rather than hijack that thread I thought I would ask a similar question:

    I would like to add a couple of styles to the TinyMCE editor. I would like to add custom class styles: photo_right, photo_center, and photo_left. These I would style in the CSS (giving them appropriate floats and padding). I want this to be very friendly for my web users so when they create a web post that contains text and pictures they have the cool option of having the text wrap (left or right) around a photo etc...

    Thanks!
      • 3749
      • 24,544 Posts
      If you go to Tools | Configuration | "Interface & Features" tab, about two-thirds of the way down the page, you’ll see "Path to .CSS file." That points to the .CSS file that TinyMCE uses. You can add your styles to the .CSS file listed there (if any), or enter the path to your own .CSS file containing those styles. Clear the cache (Site | Clear Cache) and those styles should show up in TinyMCE for you.

      Bob
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 23299
        • 1,161 Posts
        Cool!

        I will try that.

        Thanks again Bob.
        • You can also specify a list of classnames that will be added to a dropdown select in the TinyMCE menubar and that class will be added to the object highlighted, much like specifying the paragraph or H1 etc tags.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 23299
            • 1,161 Posts
            Quote from: sottwell at Jan 01, 2008, 06:33 AM

            You can also specify a list of classnames that will be added to a dropdown select in the TinyMCE menubar and that class will be added to the object highlighted, much like specifying the paragraph or H1 etc tags.

            That sounds interesting! I would like to have two or three extra class names that appear in the TinyMCE dropdown menu. How do you specify the classnames?

            I also discovered how feature rich the "EDIT CSS STYLE" button is on the upper TinyMCE menu. For those that are familiar with CSS formatting its all there. One issue though: that option does not become available to me when I use Safari 2.x but it does when using Firefox?

            Thanks!
            • Adding classnames is in the same place (Tools | Configuration | "Interface & Features" tab) as where you set the css file to use in the RTE field.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 23299
                • 1,161 Posts
                Thanks, I just found that. That’s pretty handy!

                Any thoughts on the Safari issue? Has this come up before?
                • Not too long ago you couldn’t use any RTEs with Safari; it’s supposed to be fully compliant with javascript standards and nobody else is (the main function in the editors is a Microsoft extension). Apple finally gave in and added support for that. So it’s quite likely that there are still a few "extensions" around that Safari doesn’t support.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 23299
                    • 1,161 Posts
                    Safari 3 that now comes with Leopard might be different...

                    On my system with Safari 2.04 with Tiger the following are unavailable within the TinyMCE editor:

                    * Undo and Redo
                    * Link and Unlink
                    * Outdent
                    * Edit CSS Style

                    The rest of the editor seems to work fine...