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

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

1 answer

0 votes
Zak Laughton Atlassian Team Wednesday

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

Your Name Here - Submit a Confluence Template

Want to see your team or company’s name featured ✨on our new Confluence Template Gallery? We’re looking for valued customers to share the stories behind what makes their team special and what they do...

3,435 views 5 11
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