Skip to content

Commit

Permalink
Apply quill-resize module
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeHanYeong committed Feb 8, 2022
1 parent 23f90a8 commit 40e3999
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
20 changes: 16 additions & 4 deletions django_quill/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]/dist/quill.imageCompressor.min.js",
"https://cdn.jsdelivr.net/npm/[email protected]/image-resize.min.js",
# quill-image-compress
"https://cdn.jsdelivr.net/npm/[email protected]/dist/quill.imageCompressor.min.js",
# quill-resize
"https://cdn.jsdelivr.net/npm/@botom/[email protected]/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/[email protected]/dist/resize.min.css",
# custom
"django_quill/django_quill.css",
]
6 changes: 6 additions & 0 deletions django_quill/static/django_quill/django_quill.css
Original file line number Diff line number Diff line change
@@ -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;
}
1 change: 1 addition & 0 deletions django_quill/static/django_quill/django_quill.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Quill.register("modules/imageCompressor", imageCompressor);
Quill.register("modules/resize", window.QuillResizeModule);

class QuillWrapper {
constructor(targetDivId, targetInputId, quillOptions) {
Expand Down
6 changes: 3 additions & 3 deletions django_quill/templates/django_quill/media.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<script src="//cdn.quilljs.com/1.3.7/quill.min.js"></script>

<!-- quill-image-compress -->
<script src="https://unpkg.com/lhy-[email protected].5/dist/quill.imageCompressor.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected].21/dist/quill.imageCompressor.min.js"></script>

<!-- quill-image-resize -->
<script src="https://cdn.jsdelivr.net/npm/quill-image-resize-module@3.0.0/image-resize.min.js"></script>
<!-- quill-resize -->
<script src="https://cdn.jsdelivr.net/npm/@botom/quill-resize-module@2.0.0/dist/quill-resize-module.min.js"></script>

<!-- Custom -->
<link rel="stylesheet" href="{% static 'django_quill/django_quill.css' %}">
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.38
0.1.40

0 comments on commit 40e3999

Please sign in to comment.