We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20093
    • 81 Posts
    How does one configure TinyMCE to use Media Sources? It would be great if we could have some degree of granularity in our ability to control the source used in different cases. i.e. To use different sources based on whether TinyMCE is invoked from the content area from different templates or from particular Rich Text TVs.

    I can't determine that defining a Media Source for a Rich Text TV serves any direct purpose, so I hoped to find that TinyMCE might use the setting as a path for its image insertion function, but this isn't the case.

    Specifically, though, I need to be able to set the Media Source for TinyMCE in Articles Blog Posts.

    Does anyone have some insight into any of these scenarios?
      • 20093
      • 81 Posts
      TL; DR version: TinyMCE uses 'default_media_source' for file browser paths. How can I override this on an individual basis?
        • 20093
        • 81 Posts
        I am really surprised to find that this isn't a problem for anyone else. Is everyone really okay having no degree of control over where TinyMCE gets/puts its files from/to on the filesystem?
          • 36442
          • 97 Posts
          This is really a problem.
          I've found your post because I had to assign certain media source for TinyMCE for a site editor. I've changed default media source for the editor user and this solved my problem.
          But anyway there is a lack of controlling file browser's media source.
          • Can you file it in the TinyMCE tracker? https://github.com/splittingred/TinyMCE/issues
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 20093
              • 81 Posts
              Thanks for the suggestion, Mark. I considered doing that, but wasn't sure it was the best course of action as it won't fix the issue if I decide to use an RTE other than TinyMCE. I figured it may be something that would need to change at the API level so that any other add-ons which live in the template's content area would be subject to the same kind of media source access control that is currently employed by template variables.

              What do you think? Does that sound like a good idea or something that should be filed as a feature request with the main revo tracker? Should I still file it as a TinyMCE bug?
                • 13557
                • 6 Posts
                Has anybody got an answer for this yet ...? I have created a "resources" media source to point to the resources directory - this is fine for tv's but I can't make the tinymce editor use it .... don't really want to let people loose on the whole site!!!

                Jan
                  • 13557
                  • 6 Posts
                  Has anybody got an answer for this yet ...? I have created a "resources" media source to point to the resources directory - this is fine for tv's but I can't make the tinymce editor use it .... don't really want to let people loose on the whole site!!!

                  Jan
                    • 20093
                    • 81 Posts
                    I lost track of this, but finally got around to filing a bug on github. https://github.com/splittingred/TinyMCE/issues/87

                    Thanks for resurrecting this, JannieB. It could use some more eyeballs. : )
                      • 36442
                      • 97 Posts
                      JannieB, TinyMCE uses default Media source (it's defined in system settings, the key is default_media_source).
                      Edit the user you want to use «resources» Media source in TinyMCE, open Settings tab, then Create new. Put default_media_source into Key and ID of your Media source in Value.
                      Or, you can just set default_media_source in System settings for everybody.