Skip to content
Custom HTML, CSS & JavaScript

Custom HTML, CSS & JavaScript

Custom HTML, CSS & JavaScript lets Confluence authors place small, self-contained HTML experiences directly in a page. Use it for interactive examples, lightweight visualizations, styled callouts, calculators, and other browser-native content that does not need to access Confluence or external services.

The app renders your source in a separate sandboxed frame. Inline HTML, CSS, and JavaScript can run there, while the code is isolated from the Confluence page and the app itself.

Start here

  1. Edit a Confluence page and insert Custom Code Macro HTML CSS JS.
  2. Enter your HTML, CSS, and JavaScript in the full-screen editor.
  3. Choose the macro’s maximum height and save the page.
  4. Preview the page and adjust the source as needed.

Start with Writing macro content for a working example and the supported authoring model.

What the app provides

CapabilityDetails
Normal macroAvailable when inserting a new macro. Treat its source as an HTML fragment placed inside a document body.
Advanced macroKept for existing content only. Its source is treated as a complete HTML document. It is hidden from the new-macro picker.
Full-screen editorA plain source editor with Save and Cancel actions; it has no live preview or syntax highlighting.
Automatic sizingThe rendered frame grows with its contents up to its supported maximum, then scrolls internally.
Anonymous and unlicensed viewingExplicitly supported for viewers when the Confluence page itself is accessible.

Important limits

This app is designed for self-contained code. It does not load external scripts, stylesheets, images, fonts, media, frames, or network data. The old Connect AP.* JavaScript API and native browser dialogs such as alert() are not available.

Read Security and limitations before using code from an untrusted source.

Documentation