Skip to content

Commit

Permalink
feat: add link to blog post regarding advanced extension-libs usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuester committed Jan 21, 2025
1 parent 2912a33 commit 50c4476
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions content/en/building/reference/extension-libs.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,11 @@ The function will now be available via the CHT API for [tasks]({{< ref "building
#### CHT xPath functions

To execute the function from within an xform use the [`cht:extension-lib` xpath function]({{< ref "building/forms/app#chtextension-lib" >}}).

## Advanced usage

Extension libraries are simply JavaScript functions executed in the context of the CHT web application. This means technically they can be used to do things like manipulating the DOM for fine-grained control of how elements are displayed in a form.

Advanced integrations like this are not explicitly supported (they may break in future versions of the CHT). However, they can be a powerful tool for developers looking to extend the CHT without having to fork the entire project.

See [this blog post](https://ruky.me/hacking-cht-user-interface-with-javascript-to-format-content/) from a community member for more information and inspiration on the kinds of things that can be achieved with extension libs!

0 comments on commit 50c4476

Please sign in to comment.