We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26027
    • 145 Posts
    I hope Donshakespeare is reading this but I would happily accept help from anyone. This question should have had an easy solution, but it eludes me.

    I'm using TinyMCEWrapper with Roxy Fileman under Revo 2.51.

    I have a staging environment where there are two ModX installations: e.g. staging.mydomain.org and www.mydomain.org. All files are duplicated.

    I didn't set up TinyMCE properly. When I use the editor to insert/edit a PDF which I'll call mypdf.pdf, TinyMCE places the following text into the dialogue box: /assets/files/pdfs/mypdf.pdf. My configuration of Roxy Fileman specifies "files_root" as "/assets".

    When I save the dialogue and then return to it, the path has been changed by TinyMCE to staging.mydomain.org/assets/files/pdfs/mypdf.pdf. After I push the ModX staging content to www.mydomain.com the URL remains staging.mydomain.org/assets/files/pdfs/mypdf.pdf instead of www.mydomain.org/assets/files/pdfs/mypdf.pdf.

    How do I avoid having TinyMCE prefix and hard-code the subdomain to the file path.

    I'm sure I've missed something dreadfully basic. Can you help?

    Thanks to all ... Sam Gerber
      • 42562
      • 1,145 Posts
      RE:samg

      Official TinyMCE doc
      https://www.tinymce.com/docs/configure/url-handling/


      tinymce.init({
        ...
        //find this bit of code in your TinymceWrapperCommonCode chunk (if using TinymceWrapper), or wherever your code is
        relative_urls: false,
        remove_script_host: false, // change to true
        document_base_url: MODx.config.site_url,
        ...
      });
        TinymceWrapper: Complete back/frontend content solution.
        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
        • 26027
        • 145 Posts
        Quote from: donshakespeare at Dec 16, 2016, 09:36 PM
        RE:samg

        Official TinyMCE doc
        https://www.tinymce.com/docs/configure/url-handling/


        tinymce.init({
          ...
          //find this bit of code in your TinymceWrapperCommonCode chunk (if using TinymceWrapper), or wherever your code is
          relative_urls: false,
          remove_script_host: false, // change to true
          document_base_url: MODx.config.site_url,
          ...
        });
        Don, you are a lifesaver!!!

        I NEVER would have ever found this on my own. It's harder to find than a TV Guide written in sanskrit!

        It took me a half hour to find TinymceWrapperNPCommonCode. Finally in another half hour I stumbled across "TinymceWrapperCommonCode" under an item called "Tiny Magic Publisher" and under that "Backend".

        Once there, I changed "remove_script_host:" to "true", whatever remove script host means, not to mention "relative_URLs: false" when I would have thought that was true because that seemed to be what I needed.

        SO, DONSHAKESPEARE YOU CAME THROUGH FOR ME, IN SPADES!!!!

        PM me your address and I'll mail you a couple dozen bitcoins.

        Thank heaven for Donshakespeare and for the ModX Forums!

        Best... Sam (Gerber)