News for hackers. Stuff that matters.
Re:My pain building a WYSIWYG editor with contenteditable by zamalek on Sunday September 19, 2021 @07:49AM (#28583593)
I had to replicate the SharePoint people picker: "resolved" values are styled and are removed as a whole with a single backspace/delete. SP was doing something super neat: it used ::after and content with an empty tag. A pretty neat trick, if you don't need to embed HTML (as content only supports plain text).

The bulk of my time was spent removing text formatting on paste, and Safari bugs.

Re:My pain building a WYSIWYG editor with contenteditable by dbbk on Sunday September 19, 2021 @09:29AM (#28584183)
I believe you can also achieve this by setting contenteditable="off" on an inline element to make the whole thing removable with backspace.