You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described in w3c/editing#256, document.execCommand("indent") has been generating <ul> right inside <ul> (or <ol> right inside <ol>), causing a conflict with their content models.
I guess we have two options:
Change the API behavior. This needs implementer interests.
Change the content model. Every browser supports lists inside a list, so maybe a simpler option?
Or, do nothing and deal with the conflict. A note should still be helpful in this case.
The text was updated successfully, but these errors were encountered:
I tend toward doing nothing, assuming browsers don't want to change. The contentEditable spec should indeed include a note that it generates invalid HTML in all locations where it does so; I imagine this is not the only one (e.g., it probably generates brs or divs for paragraph breaks too in some cases, which is also invalid).
I imagine this is not the only one (e.g., it probably generates brs or divs for paragraph breaks too in some cases, which is also invalid).
Well, but the invalid nested list may be preferred by users because <li> elements containing only sub list also has a bullet by the default style but this is different style from word processors. So web authors may also want to use the (currently) invalid structure.
results in something that looks weird. And there is also nothing that says that is non-conforming. In expected usage however, web developers would write something like
<ul><li>
consider these subpoints:
<ul><li>...
at which point things are fine.
And arguably the editor output of
<ul><li>consider these subpoints:</li><ul><li>
is somewhat funky as the subpoints have no direct relationship with the item they belong to.
As described in w3c/editing#256,
document.execCommand("indent")
has been generating<ul>
right inside<ul>
(or<ol>
right inside<ol>
), causing a conflict with their content models.I guess we have two options:
The text was updated successfully, but these errors were encountered: