gets macro content loading on rte load

This commit is contained in:
Shannon
2019-01-31 17:12:44 +11:00
parent f9e673ca4c
commit 9abd72f623

View File

@@ -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);