Re: [w3c/editing] insertParagraph definition is different from current browsers' behavior when selection is collapsed at end of inline element(s) (#172)

@masayuki-nakano Right, and this difference in how `<b>` and `<a>` is something all JS editors deal with in some way or other. Either they hardcode the difference or they create different categories of inline elements -- that that continue if you enter anything at the end of them and those that don't. But this is really something best dealt with in JavaScript because there can be (and are) inline formatting things that the browser doesn't really understand as easily as `<a>`. For example, what should the browser do if the user hits enter in this case:

    <p>Hello <span class="actor-name">Peter[]</span></p>

Additionally, paragraph splitting is best left to JavaScript, because there are 1000s of ways that paragraph splitting and merging could be done, and without domain knowledge of the text's contents, you're really making a blind guess as to what is right.

-- 
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/172#issuecomment-385209264

Received on Saturday, 28 April 2018 22:19:43 UTC