Announcement

Collapse
No announcement yet.

How to integrate external libraries

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to integrate external libraries

    Hello, I would like to know generally, how would be the approach to integrate external libraries in espoCRM. What will I have to put where to get it possibly update safe?

  • #2
    What do you mean by external libraries? Composer ? Basically everything inside custom modules and custom directory is safe in case of update EspoCRM.

    Comment


    • #3
      For example, I would like to give an user a guided tour on the demo website of my app. There are lots of JS libraries, that can do that, as this one: https://bootstraptour.com/
      All these scripts want you to put the dependencies in the head and/or before the closing body tag of the HTML. I don`t know, where that is in espoCRM and if it would be enough to put it once for all possible entities/pages.
      Another question would be, how I can call the script from within espoCRM.

      And at last, it would be great, if such a script could be installed as an extension.

      You see, I do not have any experience with that, but would like to give it a try.

      Comment


      • #4
        You can put js/css in client folder. You can use it in client/custom or in client/modules

        Comment


        • #5
          Hello shalmaxb ,

          Here is how I integrated the jsignature library into the eSignature extension:

          1) Saved the jsignature library files like this:

          client/modules/esignature/lib/jsignature/jsignature.min.noconflict.js
          client/modules/esignature/lib/jsignature/modernizr.js

          2) Specified the custom library here:

          application/Espo/Modules/Esignature/Resources/metadata/app/client.json
          Code:
          {
              "scriptList": [
                  "__APPEND__",
                  "client/modules/esignature/lib/jsignature/jSignature.min.noconflict.js",
                  "client/modules/esignature/lib/jsignature/modernizr.js"
              ],
              "developerModeScriptList": [
                  "__APPEND__",
                      "client/modules/esignature/lib/jsignature/jSignature.min.noconflict.js",
                      "client/modules/esignature/lib/jsignature/modernizr.js"
              ]
          }
          Best Regards
          Last edited by telecastg; 07-25-2021, 06:44 AM.

          Comment

          Working...
          X