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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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