Skip to content

Commit

Permalink
Update django_quill.js
Browse files Browse the repository at this point in the history
  • Loading branch information
erikfinnegan-lightmatter authored and LeeHanYeong committed Sep 20, 2024
1 parent 4d048c0 commit f51c2b2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions django_quill/static/django_quill/django_quill.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
Quill.register("modules/imageCompressor", imageCompressor);
Quill.register("modules/resize", window.QuillResizeModule);

class QuillWrapper {
constructor(targetDivId, targetInputId, quillOptions) {
if (!Quill.imports["modules/resize"] && quillOptions["modules"].resize) {
Quill.register("modules/resize", window.QuillResizeModule);
}
if (!Quill.imports["modules/imageCompressor"] && quillOptions["modules"].imageCompressor) {
Quill.register("modules/imageCompressor", imageCompressor);
}
this.targetDiv = document.getElementById(targetDivId);
if (!this.targetDiv) throw 'Target div(' + targetDivId + ') id was invalid';

Expand Down

0 comments on commit f51c2b2

Please sign in to comment.