|
|
|
@ -360,9 +360,7 @@ TComp> { |
|
|
|
...(textable && { contenteditable: 'false' }), |
|
|
|
}; |
|
|
|
|
|
|
|
// Remove all current attributes
|
|
|
|
each(el.attributes, (attr) => attrs.push(attr.nodeName)); |
|
|
|
attrs.forEach((attr) => $el.removeAttr(attr)); |
|
|
|
this.__clearAttributes(); |
|
|
|
this.updateStyle(); |
|
|
|
this.updateHighlight(); |
|
|
|
const attr = { |
|
|
|
@ -376,6 +374,13 @@ TComp> { |
|
|
|
$el.attr(attr); |
|
|
|
} |
|
|
|
|
|
|
|
__clearAttributes() { |
|
|
|
const { el, $el } = this; |
|
|
|
const attrs: string[] = []; |
|
|
|
each(el.attributes, (attr) => attrs.push(attr.nodeName)); |
|
|
|
attrs.forEach((attr) => $el.removeAttr(attr)); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Update component content |
|
|
|
* @private |
|
|
|
|