Hierarchy (view full)

Constructors

Properties

enabled?: ((context: any) => boolean)

Optional function to determine whether the content should be rendered. When excluded, it defaults to true.

getData?: ((context: any) => any)

An optional function that provides the relevant application context (item sheet context, character sheet context, NPC sheet context, etc.) and expects the same data or a replacement object in return. The return value is passed to the Handlebars template.

onContentReady?: ((params: OnContentReadyParams) => void)

After the custom content has been prepared for rendering and is ready to inject into the sheet, this callback is invoked.

For more complex HTML insertion scenarios, one can skip CustomContentInjectParams and simply inject the prepared content with this callback.

This callback is also useful for quick debug logging of the content to be rendered.

onRender?: ((params: OnRenderParams) => void)

Optional function which is called each time a change detection cycle occurs on the sheet. This is any time a FormApplication would normally call render().

path: string = ''

The path to the handlebars template. Use a leading slash to look in the UserData directory.

"/modules/my-module-id/templates/my-module-template.hbs"

renderScheme: RenderScheme = 'handlebars'

Optionally determines whether to refresh content each time an application render occurs.

For svelte-based content, the default is "force". For HTML and Handlebars content, the default is "handlebars".

Accessors

  • get activateDefaultSheetListeners(): undefined | boolean
  • An optional override to whether the target content should use default sheet event listeners. Defaults to false.

    Returns undefined | boolean

    Tidy is moving to Application V2, and there will no longer be any default sheet listeners. Be sure to provide your own event handling for the content that is injected.

  • set activateDefaultSheetListeners(value): void
  • An optional override to whether the target content should use default sheet event listeners. Defaults to false.

    Parameters

    • value: undefined | boolean

    Returns void

    Tidy is moving to Application V2, and there will no longer be any default sheet listeners. Be sure to provide your own event handling for the content that is injected.