Could not find handlebars helper


I have created a custom handlebars helper.

The helper (javascript file) is placed under:


The partial contents of that helper file are:

Handlebars.registerHelper(‘ifStartsWithThisOrThat’, function(inputValue, thisValue, thatValue, options) {
// super secret implementation :slight_smile:

The instance tab provider class is importing the renderer class:

import com.morpheusdata.views.HandlebarsRenderer

The handlebars/view (.hbs) has the script element:

script src=“{{asset “/hbs/handlebarsHelpers.js”}}”

But it looks like that the plugin is not able to find that helper.
The error message is:


(The uppercase of the error message is because it is within the span element with class=“stat-label”. The helper is registered with exactly the same name.)

What did I miss? :confused:

Thanks in advance! :slight_smile:

Tried to override the getRenderer method in the provider class. Still not working.

private HandlebarsRenderer renderer;

Renderer<?> getRenderer() {
if(renderer == null) {
renderer = new HandlebarsRenderer(“renderer”, getPlugin().getClassLoader());
return renderer;

Looks like there is no need to override this method.
The asset helper was still working/registered.

Added the paragraph element in our HBS file:

{{asset “/hbs/handlebarsHelpers.js”}}

The result/output was:


However, we are not able to see this script when we inspect the sources (developer tools).

Also tried to override the following method.

ContentSecurityPolicy getContentSecurityPolicy() {
return new ContentSecurityPolicy()

Still not working.