-
- 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
-
- 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.