The Docs AddOn allows you to embed HTML, JavaScript, and CSS-based content in Confluence Cloud. The initial idea came from embedding JavaDocs. However, as JavaDocs is just HTML, JavaScript, and CSS, you can use the AddOn for embedding any type of such content.
FAQ
How to add your content to the Docs AddOn?
All content shown by the Docs AddOn needs to be uploaded as an attachment to the appropriate Confluence Page. The content itself needs to be packaged as ZIP Archive. The content’s entry page should be named “index.html“ and shall be located in the ZIP Archive’s root directory.
Note: The entry page’s name can be adjusted in the AddOn’s configurations.
Here is a simple docs example:
How to configure the Docs AddOn correctly?
The Docs AddOn provides a configuration bar to adapt it to your needs.
Configuration Properties:
Description
Example
Height
The Docs AddOn’s static height in pixel on the page. Default: 600 pixel.
600
Entry Page
The main entry page of your Docs content. Default: index.html.
index.html
Filename Pattern
Filter your attachments by filename using a Java NIO Glob expression.
*.jar - Matches all files that has extension as jar.
*.{jar,zip} - Matches all files that has extension as jar or zip. { } are used to group patterns and , comma is used to separate patterns.
?.zip - Matches all files that has any single charcter as name and extension as zip.
*.* - Matches all files that has . in its name.
[xyz].jar - Matches a file name with single character ‘x’ or ‘y’ or ‘z’ and extension as jar. Square brackets [ ] are used to sepcify a character set.
[a-c].jar - Matches a file name with single character ‘a’ or ‘b’ or ‘c’ and extension as jar. Hypehen – is used to specify a range and used in [ ]
[!a].zip - Matches a file name with single character that is not ‘a’. ! is used for negation.
As all your Docs are organized as attachments on a Confluence Page basis, you can simply use Confluence’s standard REST API to add, delete or modify your content.