@writergate/quill-image-uploader-nextjs 0.2.6 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@writergate/quill-image-uploader-nextjs",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/enlear/quill-image-uploader-nextjs.git"
@@ -2,7 +2,7 @@ import Quill from "quill";
2
2
 
3
3
  const InlineBlot = Quill.import("blots/inline");
4
4
 
5
- const ATTRIBUTES = ["class", "data-comment"];
5
+ const ATTRIBUTES = ["class", "data-comment", "data-suggestion"];
6
6
 
7
7
  class CommentBlot extends InlineBlot {
8
8
  static create(value) {
@@ -14,10 +14,12 @@ class CommentBlot extends InlineBlot {
14
14
  "data-comment",
15
15
  value["data-comment"] || value.commentId
16
16
  );
17
- node.setAttribute(
18
- "data-suggestion",
19
- value["data-suggestion"] || "false"
20
- );
17
+ if (value["data-suggestion"] === "true") {
18
+ node.setAttribute(
19
+ "data-suggestion",
20
+ value["data-suggestion"]
21
+ );
22
+ }
21
23
  }
22
24
  return node;
23
25
  }