Javascript in confluence 4.2

Can someone please give me a small example of a user macro to execute a simple javascript alert?

From what I gather from another comment javascript in an html macro is now disabled?

Please help,


2 answers

Not sure what comment you are referring to. Please post a reference if you have it. In any case, HTML Plugin for Confluence supports this.

nevermid got it working


I saw this and thouht you might want to know. I've tried using your html plugin but it was giving me a "macro not found"...

Is this the reason?


mysql> select * from BANDANA where BANDANAKEY='plugin.manager.state.Map';

| 2 | _GLOBAL | plugin.manager.state.Map | <map>


Did you use insert wiki markup to? Until 4.0.0 ships, that is the only way to use it on 4.x

very strange behavior.

because it says html macro not found, it does not allow you to edit it :)

i created a user macro with html tags and $body and that actually worked and allowed me to edit.

as a test I copied the content, removed the user macro and inserted the wiki markup and tried your html macro, it started throwing a lot of javascript errors saying that certain "Objects have no methods" from my other scripts so I'm not sure what is wrong with it (may be realted to scoping) cause I can use the developer and see my methods just fine.

Thanks for your anyways...


Could you please try html-plugin-4.0.0-SNAPSHOT.obr - its about to be released. It deals with the issue I forgot to mention from

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

73 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you