Re: [w3c/editing] Removal of browser built-in Undo stack functionality from contenteditable (#150)

@dmonad Yes, I can see why one would want those. And of course my first attempt at adding an editor was also to throw out all frameworks and just start something small myself. And then a year later I just had to give up. Part of me reiterating over and over that execcommand will cause trouble is trying to stop others from wasting that year.

The thing is that some editors may not need more than say two styles (bold and italic). And so one would think that - hey why not just cook something small up right here? The problem is that even with something so tiny, people will still want to paste from other places and then immediately you start having the issue of arbitrary content. 

Or even without pasting anything, try to write a sentence in typeit, then make something bold, italic and underline. Then hit enter in the middle of the bold/italic/underline part. Inspect the dom structure. The second paragraph is in a `<div>` while the first is not. Then put it back together by hitting backspace. Then inspect the dom structure of that sentence. You'll see that it didn't actually merge the bold/italic/underline back together. And so on and on. In this case it likely will work because the user will need to get the content out via copy and then clean it up in another editor. But it's not something you should be saving. Because yes, we should try to provide tools JS editors can use, but not things that just cause garbage content to be created.

I think the size would not be as important if there were one simple editor package that everyone is using through a CDN, like was the case with jQuery ten years ago. If that was in place, then all these small editors could use that.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/150#issuecomment-559236594

Received on Wednesday, 27 November 2019 20:14:59 UTC