Skip to content

Commit be41c2b

Browse files
committed
name and reference embed content node
1 parent 59ba6e7 commit be41c2b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

blots/embed.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ const GUARD_TEXT = "\uFEFF";
77
class Embed extends Parchment.Embed {
88
constructor(node) {
99
super(node);
10-
const wrapper = document.createElement('span');
11-
wrapper.setAttribute('contenteditable', false);
10+
this.contentNode = document.createElement('span');
11+
this.contentNode.setAttribute('contenteditable', false);
1212
[].slice.call(this.domNode.childNodes).forEach(function(childNode) {
13-
wrapper.appendChild(childNode);
13+
this.contentNode.appendChild(childNode);
1414
});
1515
this.leftGuard = document.createTextNode(GUARD_TEXT);
1616
this.rightGuard = document.createTextNode(GUARD_TEXT);
1717
this.domNode.appendChild(this.leftGuard);
18-
this.domNode.appendChild(wrapper);
18+
this.domNode.appendChild(this.contentNode);
1919
this.domNode.appendChild(this.rightGuard);
2020
}
2121

0 commit comments

Comments
 (0)