diff --git a/app/app/components/section/wysiwyg/type-editor.js b/app/app/components/section/wysiwyg/type-editor.js index 5500aa77..bbb1a356 100644 --- a/app/app/components/section/wysiwyg/type-editor.js +++ b/app/app/components/section/wysiwyg/type-editor.js @@ -75,7 +75,16 @@ export default Ember.Component.extend({ } }; - tinymce.init(options); + if (typeof tinymce === 'undefined') { + $.getScript(this.session.appMeta.getBaseUrl("tinymce/tinymce.min.js?v=430"), function() { + window.tinymce.dom.Event.domLoaded = true; + tinymce.baseURL = "//" + window.location.host + "/tinymce"; + tinymce.suffix = ".min"; + tinymce.init(options); + }); + } else { + tinymce.init(options); + } }, willDestroyElement() { diff --git a/app/app/index.html b/app/app/index.html index 4042fcb7..b8d00835 100644 --- a/app/app/index.html +++ b/app/app/index.html @@ -55,7 +55,6 @@ {{content-for 'body'}} - diff --git a/app/app/utils/model.js b/app/app/utils/model.js index cca15591..7aa31384 100644 --- a/app/app/utils/model.js +++ b/app/app/utils/model.js @@ -39,6 +39,10 @@ let AppMeta = BaseModel.extend({ this.set('url', [config.apiHost, config.apiNamespace, ""].join('/')); }, + getBaseUrl(endpoint) { + return [this.get('host'), endpoint].join('/'); + }, + getUrl(endpoint) { return [this.get('host'), this.get('namespace'), endpoint].join('/'); }