We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48589
    • 33 Posts
    Hi there,

    For a customer, I've set up two copies of the same website, using Revo 2.3.5-pl.
    One context is used for one website and a second one for the other.

    Both are on different domains. That's not the problem, though, as both websites work fine. However, my issue is with the images added in the TinyMCE editor. I want my customer to not have to upload the media twice (on both domains). So I figured I'd need the full, absolute path of the added images.
    Now I've gotten it to the point that, when I add an image with the media browser, it has the full path in the "Source" field (http://...), which is what I want to make the image appear on the other domain as well. However, when I click the OK button, it is stripped down to a relative path, which is NOT what I want.

    Any ideas on what I could be doing wrong?

    Before you ask, my baseUrl has the full http://... path and baseUrlRelative is set to no.

    This question has been answered by donshakespeare. See the first response.

      • 42562
      • 1,145 Posts
      http://www.tinymce.com/tryit/url_conversion.php
      I don't know what Extra you are using, but this stuff is pretty easy in TinyMCE

      TinyMCE with no url conversion
      tinymce.init({
          selector: "...",
          plugins: 'link image code',
          convert_urls: false
      });
        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.
        • 48589
        • 33 Posts
        Although I feel like that shouldn't be the solution (shouldn't it be set via the CMS rather than the plugin?), it does seem to do the trick. Thanks.

        However, if someone has another solution, that doesn't have me edit the TinyMCE files, I'd love to hear it.
          • 42562
          • 1,145 Posts
          You did not mention which Extra you are using. There are many Extras that port in TinyMCE for you, very few of them do allow you to do all the things you can do.
          Say which one, and we might be able to point you to this or that part of the CMS if indeed the setting is available.

          I have used convert_urls: false to solve this kind of problem.
            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.
            • 48589
            • 33 Posts
            There's 2 variations of TinyMCE. One's an old one that's been around for years. And there's a newer one. I'm using the newer one.
            • discuss.answer
              • 42562
              • 1,145 Posts
              Okay I went through the system settings for that Extra, no find!
              I tried adding the new setting in system settings, no show!

              If you insist on using that Extra here is a simple solution:
              Open yourSite/assets/components/tinymcerte/js/mgr/tinymcerte.js
              Find
              Ext.extend(TinyMCERTE.Tiny,Ext.Component,{
                  cfg: {
                      selector: '#ta'
                      ,document_base_url: MODx.config.base_url
                      ,file_browser_callback_types: 'file image media'
                  }
              

              alter to this
              Ext.extend(TinyMCERTE.Tiny,Ext.Component,{
                  cfg: {
                      selector: '#ta'
                      ,remove_script_host: false //add this line
                      ,relative_urls: false //add this line
                      ,document_base_url: MODx.config.base_url
                      ,file_browser_callback_types: 'file image media'
                  }
              

              Note
              selector: '#ta' targets the content area.
              Add this functionality to anywhere you see selector: ...
              Be careful of the commas.
              An upgrade to the Extra will wipe these your changes, so back up.


              A user should never never have to this, but don't ask me why this seems to the only way to use basic TinyMCE functionality in these Extras.

              Check out TinymceWrapper, all this nonsense is avoided.
                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.
                • 48589
                • 33 Posts
                It's a bad thing that this is the only way to do it. But at least it gets the job done.
                Thanks for the help.