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

@johanneswilm 

I'd just like to address some of your comments.

Firstly, my editor is one JS file that is only ~30 KB minified, and that's mostly because of the various extra functionality related to the extensive keyboard shortcut system, continuity between languages, etc.. The execCommand stuff itself takes very few lines of code. TinyMCE is 140 KB minified. So my JS would jump from 30 KB to about 160 KB (I'd still have to add all the custom code that's not in TinyMCE).

The idea of using CDN-hosted files, or files cached across sites, misses the fact that all that JavaScript will still have to be parsed by the browser, extra HTTP requests will have be made (in the case of TinyMCE it's actually *several* files, at least 3 JS files and 1 CSS file, maybe more). **All of that stuff takes time** and makes for a slower experience for users, especially mobile users. I should not have to do that just to get bold text in a textbox.

Second, the issue of copy & paste. Yes, you are right. Things look ugly when you try to paste a webpage into TypeIt. But you can press Ctrl+Shift+V to paste unformatted text, which produces cleaner results, and takes care of your "copy one extra sentence from an email" example. Generally, I'm not sure who would expect to paste a webpage into a Web editor and expect good results with regard to formatting. Perhaps I lack imagination...

Also, I noticed that the cleanup performed by TinyMCE doesn't preserve formatting if you copy from MS Word to TinyMCE, then to MS Word again. There goes one potential use case. Similarly, I'm not sure if users can copy from one JS editor to another. When I tried to copy formatted text from Google Docs to TinyMCE, it didn't work. Maybe I'm missing something, but JS editors don't seem that great to me...

Third,

> And who is to decide what goes into a mini version? Bold and italic is something probably all can agree on. But I see you also have underline, sup and sub. Then someone else may argue they also need font color, etc. and then very quickly we are back at what we have now.

As with any feature, you have to draw the line somewhere. Of course, the W3C would decide the scope, based on demand. I think the key is to start small. Define something like `<textarea type=rich>` and allow only a very restrictive subset of HTML. Let's say, whatever formatting is allowed in a Reddit comment. The goal would be to allow faithful copying from one textarea to another, even across browsers.

-- 
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-559556223

Received on Thursday, 28 November 2019 16:39:54 UTC