From 40e39995c9cc6193b4b79dc2dee810af3fd7b14a Mon Sep 17 00:00:00 2001 From: lhy Date: Tue, 8 Feb 2022 16:34:37 +0900 Subject: [PATCH] Apply quill-resize module --- django_quill/config.py | 20 +++++++++++++++---- .../static/django_quill/django_quill.css | 6 ++++++ .../static/django_quill/django_quill.js | 1 + .../templates/django_quill/media.html | 6 +++--- version.txt | 2 +- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/django_quill/config.py b/django_quill/config.py index ab59fa7..7c6db8a 100644 --- a/django_quill/config.py +++ b/django_quill/config.py @@ -27,19 +27,31 @@ "debug": False, "suppressErrorLogging": True, }, - # quill-image-resize - "imageResize": {}, + # quill-resize + "resize": { + "showSize": True, + "locale": {}, + }, }, } MEDIA_JS = [ + # syntax-highlight "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js", + # quill "https://cdn.quilljs.com/1.3.7/quill.min.js", - "https://unpkg.com/quill-image-compress@1.2.21/dist/quill.imageCompressor.min.js", - "https://cdn.jsdelivr.net/npm/quill-image-resize-module@3.0.0/image-resize.min.js", + # quill-image-compress + "https://cdn.jsdelivr.net/npm/quill-image-compress@1.2.21/dist/quill.imageCompressor.min.js", + # quill-resize + "https://cdn.jsdelivr.net/npm/@botom/quill-resize-module@2.0.0/dist/quill-resize-module.min.js", + # custom "django_quill/django_quill.js", ] MEDIA_CSS = [ + # syntax-highlight "https://cdn.quilljs.com/1.3.7/quill.snow.css", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/darcula.min.css", + # quill-resize + "https://cdn.jsdelivr.net/npm/quill-resize-module@1.2.4/dist/resize.min.css", + # custom "django_quill/django_quill.css", ] diff --git a/django_quill/static/django_quill/django_quill.css b/django_quill/static/django_quill/django_quill.css index c478696..16a94d4 100644 --- a/django_quill/static/django_quill/django_quill.css +++ b/django_quill/static/django_quill/django_quill.css @@ -1,3 +1,9 @@ div.form-row div.django-quill-widget-container { display: inline-block; +} +.quill-editor iframe, +.quill-editor video, +button.ytp-large-play-button, +button.ytp-button { + pointer-events: none; } \ No newline at end of file diff --git a/django_quill/static/django_quill/django_quill.js b/django_quill/static/django_quill/django_quill.js index 6250146..6314ee8 100644 --- a/django_quill/static/django_quill/django_quill.js +++ b/django_quill/static/django_quill/django_quill.js @@ -1,4 +1,5 @@ Quill.register("modules/imageCompressor", imageCompressor); +Quill.register("modules/resize", window.QuillResizeModule); class QuillWrapper { constructor(targetDivId, targetInputId, quillOptions) { diff --git a/django_quill/templates/django_quill/media.html b/django_quill/templates/django_quill/media.html index 081bba2..4139a19 100644 --- a/django_quill/templates/django_quill/media.html +++ b/django_quill/templates/django_quill/media.html @@ -9,10 +9,10 @@ - + - - + + diff --git a/version.txt b/version.txt index 2cdd56e..984c498 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.1.38 \ No newline at end of file +0.1.40 \ No newline at end of file