Child pages
  • Loading Additional Web Resources For Structure Widget

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Excerpt

To include a web resource (such as custom CSS or JavaScript file) on the page every time Structure Widget is displayed, use structure.widget web resource context.

Note

Due to Atlassian SDK limitations, context-provided resources are not loaded in the Structure gadget on Dashboard or in Confluence.

Use cases:

  1. You create your own custom field and would like it to be editable in the Structure grid. The field is powered by additional JavaScript or CSS, which should be loaded on the page that displays structure.

Sample snippet from atlassian-plugin.xml:

Code Block
<web-resource key="custom-field-resource" name="My Custom Field Web Resource">
  <context>structure.widget</context>
  <resource type="download" name="custom-field-resource.js" location="js/myplugin/custom-field-resource.js"/>
</web-resource>