We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4798
    • 4 Posts
    Either I’m misunderstanding something about the "Path to CSS file" setting or it’s not working properly. As I understand it, the WYSIWYG window should actually take on the formatting specified in the css file. But I set the path to the CSS file I want to use and nothing. The pages themselves are formatted properly, but the WYSIWYG continues to display with default formatting. Which when you think about it, isn’t WYSIWIG. I’ve triple checked the path I’m inserting. I’m certain it’s correct.

    I know TinyMCE supports this feature, I’ve used it on before from scratch.

    It’s worth noting that the demo on "opensourcecms.com" doesn’t work properly either. Which suggests this isn’t just a problem with my install.

    Any thoughts anyone?
      • 26178
      • 32 Posts
      I’m curious about this as well. huh
        • 4798
        • 4 Posts
        I putzed around with this a bit more. The bug appears to be in TinyMCE. MODx is inserting the specified string into the "content_css" TinyMCE init script. But it just doesn’t work when it’s a server side directory path!

        But if I put it in as a HTTP url, it works. This will do for my purposes, but I would like to know why? All the documentation says that that it should work either way. Does anyone know what the deal is here.
          • 5904
          • 58 Posts
          Been searching for solution to this for days. cdesautels had the solution back in 2007 and I’ve just confirmed that the "Path to CSS file" still doesn’t work unless the HTTP path is entered in ’Path to CSS file’ in Tools...Configuration...Interface & Features. I’m using MODx 1.01 and tinymce3241. Thanks to cdesautels it’s possible to edit a page in WYSIWYG!
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Another cause for this to appear to not be working is that the TinyMCE is only dealing with the "content" area. So if you have something like
            <div id="content">
            [*content*]
            </div>

            and you have in your CSS
            #content p {...}

            you won’t see the formatting in the TinyMCE window because there is no #content at that level. You need to make some specific rules to deal with the stuff inside the TinyMCE container.
              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
              • 4080
              • 139 Posts
              I know this is an old thread so hopefully this will be helpful to someone. I was having the same issue in 1.0.4. I had tried adding the http:// and the full shared hosting web root path as well but to no avail. After referencing a past MODx where it did work I noticed that I didn’t have the CSS file in (assets/site/) but I had it in the MODx root (e.g. css/editor.css).