From 9abd72f6231a9fc517b2cb89776448df41a2453a Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 31 Jan 2019 17:12:44 +1100 Subject: [PATCH] gets macro content loading on rte load --- .../src/common/services/tinymce.service.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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);