We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42184
    • 27 Posts
    I've successfully installed TinyMCE in MODX Revo, but can't figure out how to get it to use my styles. My stylesheet is located at 'assets/templates/ab/css/core.css' and I have a class named 'layout-article' which is applied to the content section of my site.

    Ideally I would TinyMCE to apply the styles of the 'layout-article' class to the content shown in the text editor.

    Can anyone help?
      • 42049 ☆ A M B ☆
      • 250 Posts
      As far as I am aware you don't put your styles directly into the editor, you reference them.

      If you go to your system->system settings then select "TinyMCE" (default is "core") you can put your own styles in the drop down list titled "CSS Selectors" as a displayName=selectorName value.

      These then appear in the TinyMCE styles dropdown box.
        GEL STUDIOS
        MODX Professional | MODX Ambassador

        Website | Email | Twitter | Facebook
        • 8386 ☆ A M B ☆
        • 160 Posts
        You need to put that class definition in a separate stylesheet and include it in your main core.css for the website, otherwise TinyMCE will include every style from that stylesheet.

        So you can create a stylesheet called tinymce.css and store it in same path. Go to System Settings in MODX Manager from the Filter by area menu select Rich-Text Editor.

        Now look for Path to CSS File.
          • 29597 ☆ A M B ☆
          • 350 Posts
          In the manager you can go to system settings > select 'Filter by area' > 'Rich text editor'
          Here you can assign a path to a css file under: 'Path to CSS file'

          Should work....
            MODX Ambassador (NL) | Responsive web design specialist, developer & speaker
            DESIGNfromWITHIN, MPThemes and Any Screen Size
            Follow me on Twitter | Read my blog | My code on GitHub
            • 42184
            • 27 Posts
            Yes, that's worked. Thanks for your help. smiley