mirror of
https://github.com/codex-team/editor.js
synced 2026-03-15 23:25:47 +01:00
18 lines
No EOL
330 B
JavaScript
18 lines
No EOL
330 B
JavaScript
var comments = function(comments) {
|
|
|
|
comments.add = function(node) {
|
|
|
|
var id = node.dataset.id,
|
|
commentInput = codex.draw.commentInput();
|
|
|
|
commentInput.dataset.blockId = id;
|
|
|
|
node.insertBefore(commentInput, node.firstChild);
|
|
|
|
};
|
|
|
|
return comments;
|
|
|
|
}({});
|
|
|
|
module.exports = comments; |