Standardize execCommand("insertParagraph") in inline editing host
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 202
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
Test case: https://jsfiddle.net/d_toybox/7w0m6722/11/
I think that "insertParagraph" command (including Enter key press) in an inline editing host such as <span contenteditable>foo bar</span> should cause inserting <br> element.
In the testcases, Chrome and Safari just inserted <br> element for Editor 1 and Editor 2. I guess, Editor 3 case is just their unexpected bug.
Edge doesn't work well in any cases. It inserts <p> or <div> into <span> element.
Firefox will insert <br> element in these cases at 60 or 61 (note that starting Firefox 60, default paragraph separator becomes <div>. 59 and earlier used <br> and we have a bug in 60. See https://bugzilla.mozilla.org/show_bug.cgi?id=1435123)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked jsFiddle test case and compare the reported behavior for insertParagraph in inline contenteditable hosts across browsers. Review the expected handling of Enter and the Editor 1–3 cases; done means the standard clearly defines the interoperable result, including the noted paragraph-separator behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100