@writergate/quill-image-uploader-nextjs 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/quill.imageUploader.js +0 -22
package/package.json
CHANGED
@@ -12,11 +12,6 @@ class ImageUploader {
|
|
12
12
|
"[Missing config] upload function that returns a promise is required"
|
13
13
|
);
|
14
14
|
|
15
|
-
if (typeof this.options.renderComment !== "function")
|
16
|
-
console.warn(
|
17
|
-
"[Missing config] renderComment function that returns a promise is required"
|
18
|
-
);
|
19
|
-
|
20
15
|
if (typeof this.options.newComment !== "function")
|
21
16
|
console.warn(
|
22
17
|
"[Missing config] newComment function that returns a promise is required"
|
@@ -36,7 +31,6 @@ class ImageUploader {
|
|
36
31
|
|
37
32
|
this.handleDrop = this.handleDrop.bind(this);
|
38
33
|
this.handlePaste = this.handlePaste.bind(this);
|
39
|
-
this.renderComment = this.renderComment.bind(this);
|
40
34
|
|
41
35
|
this.quill.root.addEventListener("drop", this.handleDrop, false);
|
42
36
|
this.quill.root.addEventListener("paste", this.handlePaste, false);
|
@@ -50,22 +44,6 @@ class ImageUploader {
|
|
50
44
|
}
|
51
45
|
}
|
52
46
|
|
53
|
-
renderComment(comment) {
|
54
|
-
const { id, range } = comment;
|
55
|
-
const { index, length } = range;
|
56
|
-
const formattedRange = {
|
57
|
-
length,
|
58
|
-
index,
|
59
|
-
};
|
60
|
-
|
61
|
-
this.quill.formatText(
|
62
|
-
formattedRange,
|
63
|
-
CommentBlot.blotName,
|
64
|
-
{ commentId: id },
|
65
|
-
"user"
|
66
|
-
);
|
67
|
-
}
|
68
|
-
|
69
47
|
addComment() {
|
70
48
|
let range = this.quill.getSelection();
|
71
49
|
if (range && range.length > 0 && this.options.newComment) {
|