Closed JaneCoder closed 7 years ago
Hello,
I'm working on solving an issue where our app is mounted with a url as https://my_server.company.com/my_app.
When tinymce loads on dev without precompile each individual file is loaded perfectly, such as https://my_server.company.com/my_app/assets/tinymce/plugins/preview/plugin.js
But when using asset precompile in staging I get lots of not found messages for links missing the context, like: https://my_server.company.com/assets/tinymce/plugins/preview/plugin.js
How can I make tinymce know to look for the items using the url with the /my_app/ context under which the app is mounted on apache? Any advice appreciated.
My solution, if anyone else has this issue, was to add
tinymce.baseURL = '<%= "#{$host}/assets/tinymce"%>'
before initialization of tinymce, where $host resolves to https://server.company.com/my_app.
Hello,
I'm working on solving an issue where our app is mounted with a url as https://my_server.company.com/my_app.
When tinymce loads on dev without precompile each individual file is loaded perfectly, such as https://my_server.company.com/my_app/assets/tinymce/plugins/preview/plugin.js
But when using asset precompile in staging I get lots of not found messages for links missing the context, like: https://my_server.company.com/assets/tinymce/plugins/preview/plugin.js
How can I make tinymce know to look for the items using the url with the /my_app/ context under which the app is mounted on apache? Any advice appreciated.