Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use custom dialog for macros in confluence

Mehrad Rafigh June 21, 2017

Hi guys,

I am trying to solve an issue I have with a library inside my macro. The new update of the lib introduces a svg node - which is invisible -, which is used to calculate the center of the document to position the diagram(s). The problem is that, when I add more than one of my macros to one page, the page reloads or throws an error - depending on the browser. 

After some digging I found out, that this invisible svg node collides with the dim function inside blanket.js of AUI. Since it is a svg element and svg elements to not have the property className, I get element.className.match is not a function

I tried to use jQuery's UI Dialog implementation, but I get the same exact error. Somehow the Macro Dialog still opens and the hides away. Is there a way to shut down the dialog from confluence and force confluence to use my Dialogs and not the AUI Dialogs?

When I remove the svg node from the dom, the error does not occur then anymore. 

What are my possibilities now? Monkey patch blanket.js? Patch Lib? Dump AUI Dialog or whatever it is, that pops up when I try to add a macro to a page.

I hope I made my self clear....If not, do not hesitate to ask me. Any help is highly appreciated. Stucked on this for a while now....

 

Thanks in advance!

1 answer

0 votes
Vero Rivas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 18, 2022

Hi @Mehrad Rafigh 

   Look at this post, maybe can help you

   https://community.developer.atlassian.com/t/custom-macro-dialog-macrobrowser/5132

Cheers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events