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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • 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

Code Completion for AUI / AJS in JavaScript Edited


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

1 answer

0 votes
Zak Laughton Atlassian Team Jan 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

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
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

383 views 23 8
Join discussion

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