Replies: 1 comment
-
Great talk, everyone 🤣😭 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Handlebars injection
The first and most significant offering for this API function is handlebars support. Handlebars templating should provide all the features one would expect if they were rendering a template and injecting by hand.
Minimal example
Here is a minimal example that injects your handlebars template into a custom container within all items' details tab:
Limit your content to specific items, under specific circumstances
Here is an example which limits your additional content based on what item is being rendered:
Adjust context data for your module
Wire custom events, make any final preparations on render
The render lifecycle with Tidy 5e Sheets is somewhat different from the traditional FormApplication / Handlebars-based application. As a result, the typical render hooks are rarely invoked. For this reason, this API offers you an
onRender
callback whenever your content is re-rendering. With this said, all injected content will be targeted for re-render as often as it would in a normal FormApplication.Here is an example of writing some data to the console and wiring a custom event on a button in my custom item content template:
Beta Was this translation helpful? Give feedback.
All reactions