Code Completion for AUI / AJS in JavaScript

Daniel Kühner January 14, 2020

Hi,

I am starting to write a Confluence User Macro and I was wondering how I can get JavaScript code completion e.g. in Visual Studio Code (or any other editor) for AUI / AJS.

I would like to know what is behind `AJS.*`. Like `AJS.toInit()` or `AJS.Confluence.*` and so on.

Thanks, Daniel

2 answers

0 votes
Hua Soon SIM _Akeles_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 17, 2021
0 votes
Zak Laughton
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 15, 2020

Hi Daniel!

Unfortunately, I wasn't able to find a definitive answer, but thought I'd share some of my investigation in case it helps.

As long as you're importing the module that has AJS in the file, VS Code should be able to make suggestions for you. I'm not quite sure where you can import it from though. These pages may give some clues, and it looks like you may be able to use a file in the Confluence installation itself (though I don't have a local installation for testing):

You may also want to ask this question in the Atlassian Developer Community, as there may be someone there who has come up with a solution for this.

– Zak

Daniel Kühner January 20, 2020

Hi Zak,

thank you for your research but I have found there nothing what helped me. The links are in my opinion more about including custom JS to macros or are about the Java Macro development (what I am not doing). What file did you mean - do you have a filename for me?

I have also tested using the AUI Node.js module from the AUI - Getting started guide but this did also not help. And I also switched to JetBrains WebStorm and IntelliJ IDEA - which was better with jQuery, but nothing better.

Could you provide me a link to the reference documentation of AJS so I can look up there the possible properties and functions it provides? So I can shimmy down myself there. And for example can you directly show me there the `AJS.toInit()` function?

I have raised my question again in the ADC - let's wait.

Thanks so far - Daniel

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events