Javascript Library folder

Hello, I am struggling a little bit with adding / deploying a javascript library as a UI component (in this case its a heavily modified creditor instance).

I have created the component a-ok and it works fine, when I include a javascript path like


@JavaScript({
        "vaadin://ckeditor/ckeditor.js",
        "vaadin://ckeditor/adapters/jquery.js", ... etc

It does NOT work if I include the ckeditor folder in my package under …/web/toolkit.ui.ckhtmleditor/
if I just put the following


@JavaScript({
        "ckeditor/ckeditor.js",
        "ckeditor/adapters/jquery.js", ... etc

My problem lies with how to deploy the application as an Uber Jar (or even a WAR for that matter) - I.e. how to get the ckeditor folder and all its related files included in the deployable package.

Any help would be greatly appreciated

Regards

Hi,

You need to place CKEditor files in the web/VAADIN/resources directory in Web module.
public://attachments/a3b65aaff827a8f536c2f13868b56de6.png

After that, you will be able to include javascript files using the vaadin:// prefix.
I’ve prepared a sample project on GitHub.
Regards,
Gleb

a3b65aaff827a8f536c2f13868b56de6

Perfect - thank you