Could you please help ? ----- About Confluence page-helper.js

Hi, I added a familiar function next to Confluence inline comment.

However, some code I wrote in file page-helper.js always run with an error.

Would you please help to solve the problem ? Thanks a lot.

I’d guess that your code is getting called before the text highlighter functionality has been added.

Try adding a dependency on the text highlighter plugin in your web resources block in your atlassian-plugin.xml file

1 Like

What @david said. I would also first enclose my js code within the

AJS.toInit(function () {
});

Thank you for your suggestion. You help me a lot.
It works after adding a dependency.
You are great. Thank you !

1 Like

Hi Panos. Thank you so much.
The code is actually within the AJS.toInit(function () {
}).

1 Like