drawio-desktop icon indicating copy to clipboard operation
drawio-desktop copied to clipboard

Support loading local libs from local path

Open josephgarnier opened this issue 2 years ago • 1 comments

Preflight Checklist

  • [X] I agree to follow the Code of Conduct that this project adheres to.
  • [X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

Describe the bug Goal: In desktop version, use a custom library stored in local. I followed this FAQ article.

To Reproduce Steps to reproduce the behavior:

  1. Go in Extras->Configuration menu
  2. Paste this following json by replacing the url with a path to your local library (for example, one of them). Mine is C:\Users\garnj\AppData\Roaming\draw.io\shape_libraries\windows-10-icons.xml
{
  "debug": true,
  "defaultLibraries": "general;basic;arrows2;flowchart",
  "enabledLibraries": null,
  "libraries": [{
      "title": {
        "main": "Additional Libaries"
      },
      "entries": [ {
          "id": "windows-10-icons",
          "title": {
            "main": "Windows 10 Icons"
          },
          "desc": {
            "main": "Collection of Windows 10 Icons"
          },
          "libs": [{
              "title": {
                "main": "Windows 10 Icons Lib"
              },
              "url": "C%3A%5CUsers%5Cgarnj%5CAppData%5CRoaming%5Cdraw.io%5Cshape_libraries%5Cwindows-10-icons.xml",
              "prefetch": true
            }
          ]
        }
      ]
    }
  ],
  "enableCustomLibraries": true
}

Expected behavior The following error message is displayed :

image

I know there is a protection for remote urls (see here and here), but if this configuration does not work for local files, in what case to use it?

draw.io version (In the Help->About menu of the draw.io editor):

  • draw.io version: 21.1.2

Desktop (please complete the following information):

  • OS: Windows, Desktop Diagrams.net version

josephgarnier avatar Apr 10 '23 09:04 josephgarnier

Changing this to a feature request. Only URLs are currently supported, that path isn't a URL. File protocol is not supported.

davidjgraph avatar Jun 11 '24 16:06 davidjgraph