From 25cca9ba62fe64116b703cb21ee2184de9379461 Mon Sep 17 00:00:00 2001 From: Matt Jeff Date: Fri, 18 Nov 2022 02:04:24 +0100 Subject: [PATCH] add support for plugins linked by their full url --- django_editorjs_fields/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_editorjs_fields/widgets.py b/django_editorjs_fields/widgets.py index 98fb2e6..c53773a 100644 --- a/django_editorjs_fields/widgets.py +++ b/django_editorjs_fields/widgets.py @@ -83,7 +83,7 @@ def media(self): plugins = self.plugins or PLUGINS if plugins: - js_list += ['//cdn.jsdelivr.net/npm/' + p for p in plugins] + js_list += [(p if p.startswith('https://') else ('//cdn.jsdelivr.net/npm/' + p)) for p in plugins] js_list.append('django-editorjs-fields/js/django-editorjs-fields.js')