@writergate/quill-image-uploader-nextjs 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/blots/comment.js +12 -2
package/package.json
CHANGED
package/src/blots/comment.js
CHANGED
@@ -7,8 +7,18 @@ const ATTRIBUTES = ["class", "data-comment"];
|
|
7
7
|
class CommentBlot extends InlineBlot {
|
8
8
|
static create(value) {
|
9
9
|
const node = super.create();
|
10
|
-
|
11
|
-
|
10
|
+
const commentId = value["data-comment"] || value.commentId;
|
11
|
+
if (commentId) {
|
12
|
+
node.setAttribute("class", value.class || "ql-wg-comment-wrapper");
|
13
|
+
node.setAttribute(
|
14
|
+
"data-comment",
|
15
|
+
value["data-comment"] || value.commentId
|
16
|
+
);
|
17
|
+
node.setAttribute(
|
18
|
+
"data-suggestion",
|
19
|
+
value["data-suggestion"] || "false"
|
20
|
+
);
|
21
|
+
}
|
12
22
|
return node;
|
13
23
|
}
|
14
24
|
|