Ensures the tinymce baseURL is set before it's initialized so that when we minify it's assets it knows where to load more assets from.

This commit is contained in:
Shannon
2019-09-18 20:37:05 +10:00
parent b81bd66456
commit a384c0866b
3 changed files with 5 additions and 3 deletions

View File

@@ -144,7 +144,6 @@ angular.module("umbraco.directives")
//we need to add a timeout here, to force a redraw so TinyMCE can find
//the elements needed
$timeout(function () {
tinymce.DOM.events.domLoaded = true;
tinymce.init(baseLineConfigObj);
}, 150, false);
}

View File

@@ -242,6 +242,10 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
*/
getTinyMceEditorConfig: function (args) {
//global defaults, called before/during init
tinymce.DOM.events.domLoaded = true;
tinymce.baseURL = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + "/lib/tinymce/"; // trailing slash important
var promises = [
this.configuration(),
getStyles(args.stylesheets)

View File

@@ -84,8 +84,7 @@ angular.module("umbraco")
//we need to add a timeout here, to force a redraw so TinyMCE can find
//the elements needed
$timeout(function () {
tinymce.DOM.events.domLoaded = true;
$timeout(function () {
tinymce.init(baseLineConfigObj);
}, 200);
}