[w3c/editing] Nested editing hosts do not need to be wrapped in insertParagraph (Issue #490)

gmta created an issue (w3c/editing#490)

When performing the action for `insertParagraph`, step 11 asks to check if the container is not editable:

https://github.com/w3c/editing/blob/b9fbe88d2319c5667a008804c2364023ce4ccec0/docs/execCommand/index.html#L13580-L13584

This is not how it currently works in both Chrome and Firefox for the following case:

```html
<div contenteditable>foo <div contenteditable>bar</div></div>
```

If `insertParagraph` is run while a selection exists inside the inner editing host, a new container is created to wrap the contents in. This should not be necessary, and Chrome and Firefox both use the existing inner editing host as the container.

The behavior seems to be more accurately reflected by:

`If the container is not editable and the container is either not an editing host, or its parent is neither editable nor an editing host, ...`

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

Message ID: <w3c/editing/issues/490@github.com>

Received on Wednesday, 3 September 2025 13:48:42 UTC