we are trying to create one macro plugin. we have written below code on click of insert button on macro editor.
let macroRenderRequest = {
contentId: window.parent.AJS.Confluence.Editor.getContentId(),
macro: {
name: "q-assets",
body: ReactDOMServer.renderToString(<QMacroRenderer />),
},
};
window.parent.tinyMCE.confluence.MacroUtils.insertMacro(
macroRenderRequest
);
Macro plugin editor -
After click on insert button -
After refreshing the page it will display like below -
We have identified that our plugin code is working perfectly in editor but when we click on insert button, it will insert the data as simple HTML in preview mode and also confluence won’t have our plugin code after closing the macro editor. This behaviour of confluence will create css issue in edit mode.