Hi,
I have created a button for which I would like to get loaded some js from clientlibs folder.
The clientlibs folder is created with some categories andcq:ClientLibraryFolder jcr:primaryType (screenshot 1) and containing the script universaleditor.js. The button "universaleditor" has the child "items" containing the node "clientlibs" with the categories of the clientlibs folder and sling:resourceType granite/ui/components/coral/foundation/includeclientlibs (screenshot 2).
The js from the client library folder is not loading in AEM when displaying the universaleditor button.
Can you please suggest why loading of js might fail?
Thanks,
Peter
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @kautuk_sahni ,
yes, it is working at the end. I had 2 issues:
- missing js.txt file as suggested by @arunpatidar , thanks a lot for that
- the clientlib's category needed to be referred in the .content.xml's
<head>
<clientlibs ..
tag, instead of adding it under the selection button clientlib tag (how I found it in some post it could work but it did not).
Js is loading now and I can use it for my purposes.
Thanks,
Peter
Hi @pnagy
You are missing js.tx file where you need to add universaleditor.js path
More info : https://medium.com/@toimrank/aem-clientlibs-css-and-js-6fda52c4e26f
Hi @arunpatidar ,
right, I re-tried with js.txt but I still miss something.
I double check it.
Thanks,
Peter
@pnagy Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Hi @kautuk_sahni ,
yes, it is working at the end. I had 2 issues:
- missing js.txt file as suggested by @arunpatidar , thanks a lot for that
- the clientlib's category needed to be referred in the .content.xml's
<head>
<clientlibs ..
tag, instead of adding it under the selection button clientlib tag (how I found it in some post it could work but it did not).
Js is loading now and I can use it for my purposes.
Thanks,
Peter
Views
Likes
Replies
Views
Like
Replies
Views
Likes
Replies