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

@tszynalski :  Now I actually had time to try out TinyMCE and look at the bugs you thought you had found:

> after 30 seconds, I already ran into an issue where I had an empty paragraph above the table that was *undeletable*.

That's actually a feature in many JS editors. When I had more framework-less editor I also did that (guarantee that there is always a paragraph before, after and in-between tables). The point of that is that otherwise it is impossible to get the caret to move to some places around tables. Other editing frameworks deal with that differently - for example the framework can draw a sideway caret if it otherwise is in a place that it would be impossible to reach. I think it's one of those examples where it's a good idea to let different editors experiment with different solutions and then eventually one of those solutions will likely be what wins because it seems most intuitive to users. And then everyone adopts that.

> For example, in TinyMCE, when you press Backspace here: `text <a href="ddd">e</a>|`, the result will be `text|` (why did it "eat" the space after "text"?).

That's another feature. If you do what you describe but with a linked word that is a bit longer, it will first highlight the entire word and then delete the word letter by letter. Once the last letter of the link has been deleted, it also deleted the space after it because otherwise there would either be two spaces or one space and then a period or comma or whatever comes after it, which most likely is not what you want.

> And the markup it generates is much uglier than contenteditable (perhaps it is customizable, I haven't checked). Tons of housekeeping attributes on elements, dummy `<br>` elements...

I am in no way a TinyMCE expert, but you do realize that it differentiates between the HTML that it maintains in the DOM during editing and the HTML it outputs as final output, right? (You get the output by means of a method [1]). The reason for this difference in many editors is that it needs one HTML to maintain certain information in the editor and also to get the caret to move in one specific way, but then it doesn't want or need all that when it exports the HTML.

[1] https://www.tiny.cloud/docs/api/tinymce.html/tinymce.html.writer/#getcontent

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

Received on Monday, 2 December 2019 22:08:49 UTC