with a -南方客的回答
with a 后端 未结 关注 8 1664 情歌与酒 2021-02-01 16:00 I have observed an undesirable behaviour in Chrome that occurs when one joins two \'s by deleting the separation between them. Although the
I have observed an undesirable behaviour in Chrome that occurs when one joins two \'s by deleting the separation between them. Although the
Here is my take on removing the extra spans
document.querySelector('[contenteditable=true]') .addEventListener('DOMNodeInserted', function(event) { if (event.target.tagName == 'SPAN') { event.target.outerHTML = event.target.innerHTML; } });