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
- Edit a Confluence page and insert Custom Code Macro HTML CSS JS.
- Enter your HTML, CSS, and JavaScript in the full-screen editor.
- Choose the macro’s maximum height and save the page.
- 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
| Capability | Details |
|---|---|
| Normal macro | Available when inserting a new macro. Treat its source as an HTML fragment placed inside a document body. |
| Advanced macro | Kept for existing content only. Its source is treated as a complete HTML document. It is hidden from the new-macro picker. |
| Full-screen editor | A plain source editor with Save and Cancel actions; it has no live preview or syntax highlighting. |
| Automatic sizing | The rendered frame grows with its contents up to its supported maximum, then scrolls internally. |
| Anonymous and unlicensed viewing | Explicitly 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
- Writing macro content — create and edit Normal and Advanced macro content.
- Macro settings and sizing — source storage and maximum-height behavior.
- Compatibility and migration — existing Connect macro behavior and the Advanced macro.
- Security and limitations — isolation, supported resources, and risk boundaries.