When I add the script tag <script src="../Scripts/tinymce.min.js"></script>
to my page, TinyMCE loads fine - with plugins and theme referencing the .min versions. However, when I remove the script tag and try loading it with jQuery, it's referencing the non-minified version, as noted in the console log. I'm using TinyMCE v4.1.7 (2014-11-27)
$.getScript('http://localhost:52417/Scripts/tinymce.min.js', function () {
window.tinymce.dom.Event.domLoaded = true;
tinymce.baseURL = 'http://localhost:52417/Scripts';
tinymce.init({
selector: '#announcementText',
plugins: ['link image'],
toolbar: 'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent | link image',
menubar: false,
statusbar: false
});
});
GET http://localhost:52417/Scripts/themes/modern/theme.js 404 (Not Found)
GET http://localhost:52417/Scripts/plugins/link/plugin.js 404 (Not Found)
GET http://localhost:52417/Scripts/plugins/image/plugin.js 404 (Not Found)
The domLoaded and baseURL lines were found from other examples on SO, and didn't make a difference. How can I get it to reference the correct path to the theme and plugins?
Add tinymce.suffix = '.min';
before invoking tinymce.init()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With