Hi, I'm trying to create a custom dialog for my macro plugin. I tried using AJS.MacroBrowser.setMacroJsOverride but it is not working. Below is my code:
AJS.bind("init.rte", function(){
AJS.MacroBrowser.setMacroJsOverride("dg-macro", {
opener: function (macro) {
$("body").append(getDialogHTML());
AJS.dialog2("#dg-macro-dialog").show();
tinymce.confluence.MacroUtils.insertMacro({
contentId: Confluence.Editor.getContentId(),
macro: {
name: "dg-macro",
params: {
search: "abcd",
placeholder: "efgh"
},
defaultParameterValue: "",
body: undefined
}
}, macro);
}
});
});
getDialogHTML() returns a markup string.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.