@sereneinserenade/tiptap-comment-extension
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "@sereneinserenade/tiptap-comment-extension", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Tiptap Extension for adding comments", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -31,4 +31,8 @@ # Tiptap Comment Extension: | ||
import StarterKit from "@tiptap/starter-kit"; | ||
import Comment from "@sereneinserenade/tiptap-comment-extension"; | ||
import CommentExtension from "@sereneinserenade/tiptap-comment-extension"; | ||
/* or | ||
import { CommentExtension } from "@sereneinserenade/tiptap-comment-extension"; | ||
*/ | ||
const extensions = [ | ||
@@ -35,0 +39,0 @@ StarterKit, |
@@ -47,3 +47,4 @@ import { Mark, mergeAttributes, Range } from "@tiptap/core"; | ||
default: null, | ||
parseHTML: (el) => (el as HTMLSpanElement).getAttribute("data-comment-id"), | ||
parseHTML: (el) => | ||
(el as HTMLSpanElement).getAttribute("data-comment-id"), | ||
renderHTML: (attrs) => ({ "data-comment-id": attrs.commentId }), | ||
@@ -119,3 +120,3 @@ }, | ||
mark.type.name === "comment" && | ||
mark.attrs.commentId === commentId | ||
mark.attrs.commentId === commentId, | ||
); | ||
@@ -122,0 +123,0 @@ |
18786
386
81