WebResources
The WebResources placeholder can be used to apply Confluence styling and scripts to the viewport.
When content is rendered (either for viewports or the Confluence UI) every macro may mark web resources as required. These are collected and once the rendering is complete the whole batch of resources can be included as described below.
You may also include additional resources or whole context batches. This should only be necessary if a macro you are using isn't properly requiring the resources it actually needs.
CSS and Script Conflicts
Due to the web resources mechanism in Confluence the Javascript and CSS batches that are linked to in the generated tags should be considered standalone resources.
Therefore they most probably will apply as well to the static (non-content) HTML elements provided by your theme and will break your own styling. This is especially true if you built your theme on top of an AUI version that is distinct from the one provided by Confluence.
We invested great efforts to ensure that our new default theme - Scroll WebHelp - contains the required CSS scoping and reset information to keep that effect as minimal as possible.
We recommend that you apply similar scoping to your own theme before using the web resource placeholders. You can get the Scroll WebHelp theme here: https://bitbucket.org/K15t/scroll-webhelp-theme
Methods
Name | Type | Description |
---|---|---|
| String | Tags for all CSS resources. |
| String | Tags for all JavaScript resources. |
| String | All HTML meta tags. |
| n/a | Ensures that specified resource is included when using
|
| n/a | Ensures that the resources for the given context are included when using
|
| String | All required resources, CSS and JavaScript. Also meta tags. |