SylwekFr
SylwekFr

Reputation: 328

Loading third party from manifest in SAPUI5

Environment :

Framework : SAPUI5 V1.38
IDE : SAP WEB IDE

Problem :

I would like to use this like to use this 3rd party https://seballot.github.io/spectrum/ in my SAPUI5 Application (there is not yet colorPicker standard component in V1.38), and this use jQuery, how can I load these ressources properly in SAPUI5 (if possible in Manifest.json or Component.js) ?

My try :

In manifest.json:

"resources": {
    "js": [
        {
            "uri": "https://cdn.jsdelivr.net/npm/[email protected]/dist/spectrum.min.js"
        },
        {
            "uri": "https://code.jquery.com/jquery-3.5.1.min.js"
        }
    ],
    "css": [
        {
            "uri": "css/style.css"
        },
        {
            "uri": "css/style_default.css"
        },
        {
            "uri": "https://cdn.jsdelivr.net/npm/[email protected]/dist/spectrum.min.css"
        }
    ]
},

This is not working (as the path are not a relative, they are CDN).
I would like an API/CDN solution as I which also to link Google Map API and reCaptcha V2.0

Upvotes: 0

Views: 1429

Answers (1)

Petr Bečka
Petr Bečka

Reputation: 794

Download all you resources, put them into your project and then include in a manifest.json like:

    "resources": {
        "js": [
            {
                "uri": "js/sourceCode.js"
            }
        ]
    },

Upvotes: 0

Related Questions