diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js index b2ec94fffe..90cb793a91 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js @@ -474,6 +474,16 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s } }); + }); + + /** when the contents load we need to find any macros declared and load in their content */ + editor.on("SetContent", function (o) { + + //get all macro divs and load their content + $(editor.dom.select(".umb-macro-holder.mceNonEditable")).each(function () { + createInsertMacroScope.loadMacroContent($(this), null); + }); + }); /** @@ -518,16 +528,6 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s //NOTE: This could be another way to deal with the active/inactive state //editor.on('ObjectSelected', function (e) {}); - /** when the contents load we need to find any macros declared and load in their content */ - editor.on("LoadContent", function (o) { - - //get all macro divs and load their content - $(editor.dom.select(".umb-macro-holder.mceNonEditable")).each(function () { - createInsertMacroScope.loadMacroContent($(this), null); - }); - - }); - //set onNodeChanged event listener editor.on('NodeChange', onNodeChanged);