Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to use tinymce.confluence.MacroUtils.updateMacro()

I'm trying to update my macro in the editor after a user has given some input for the macro parameters (can do this in the macro property panel). I tried to use the tinymce.confluence.MacroUtils.insertMacro(e,t) method, but it replaces the macro. My goal is that only the macro parameters are adjusted to the input. I found out that there exists the tinymce.confluence.MacroUtils.updateMacro(e,t,n,r) method, but I can't find any information about the  needed parameters or a documentation on how to use it. Does someone know where I can find this information or has an example on how to use this method?

Thanks for any help.

2 answers

1 accepted

0 votes
Answer accepted

I couldn't get the updateMacro() method to work. But with a little help did I found a different solution.

I am now updating my macro placeholder and macro property panel in three steps: destroy property panel, replace macro with macro with the new parameters, create property panel. This way is also the custom image placeholder updated / "rerendered". If you want to just change the macro parameters then you can also overwrite the "data-macro-parameter" String. This will save the new parameters, but won't cause the image placeholder to update / "rerender".

To see some example code look at this ticket: https://community.developer.atlassian.com/t/how-to-use-tinymce-confluence-macroutils-updatemacro/45809 

0 votes
Bill Bailey Community Leader Mar 03, 2021

I would suggest check on the community.developer.atlassian.com . But for this community, maybe you could write an article about how to modify the editor. It would be a hot topic.

Hi Bill

Thanks for the suggestion. I will try it there. If I find a solution to my problem I will also explain it here.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

Introducing Confluence Cloud for Microsoft Teams (Available for Preview!)

Hi Atlassian Community, Remote work has shifted how teams collaborate, and we’ve heard from many of you that Microsoft Teams has become mission critical to many of your workflows, from how you chat...

2,548 views 21 21
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you