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

Javascript in confluence 4.2

Leo Dopson August 17, 2012

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,

Leo

2 answers

0 votes
Leo Dopson August 17, 2012

nevermid got it working

Leo Dopson August 20, 2012

Bob,

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?

Leo


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

| BANDANAID | BANDANACONTEXT | BANDANAKEY | BANDANAVALUE
| 2 | _GLOBAL | plugin.manager.state.Map | <map>

<string>org.swift.confluence.html:html</string>
<boolean>false</boolean>
</entry>

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
August 20, 2012

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

Leo Dopson August 21, 2012

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...

Leo

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
August 21, 2012

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 https://bobswift.atlassian.net/wiki/display/HTML/HTML+Macro

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
August 21, 2012

HTML 4.0.0 has been released.

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
August 17, 2012

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events