Set contenteditable earlier in mentions blot

This commit is contained in:
Fedor Indutny
2021-09-01 13:42:12 -07:00
committed by GitHub
parent 15cad32862
commit 0cb340fd1e

View File

@@ -48,6 +48,7 @@ export class MentionBlot extends Embed {
static buildSpan(mention: MentionBlotValue, node: HTMLElement): void {
node.setAttribute('data-uuid', mention.uuid || '');
node.setAttribute('data-title', mention.title || '');
node.setAttribute('contenteditable', 'false');
const mentionSpan = document.createElement('span');
@@ -63,10 +64,4 @@ export class MentionBlot extends Embed {
node.appendChild(mentionSpan);
}
constructor(node: Node) {
super(node);
this.contentNode.setAttribute('contenteditable', 'false');
}
}