- From: Javier Fernandez Garcia-Boente <notifications@github.com>
- Date: Tue, 11 Sep 2018 15:22:34 -0700
- To: w3c/editing <editing@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/editing/issues/179@github.com>
Lets consider the following code: ``` <div id='test' contenteditable='true'> <div id='test0'> <span id='test0-1' style="font-style: italic; color: rgb(00, 255, 00)">This text should be green italic</span> </div> <div id='test1'> <ul style="font: 20px/1 monospace; color: blue;"> <li>List item 1</li> </ul> <span id='test2' style="font-style: italic; color: rgb(00, 255, 00)">This text should be green italic</span> </div> </div> <script> var d = document.getElementById('test'); d.focus(); var sel = document.getSelection(); var range = sel.getRangeAt(0); d = document.getElementById('test2'); range.selectNode(d) range.collapse(); document.execCommand('insertUnorderedList'); </script> ``` As far as I know, when applying the _insertOrderedList/insertUnorderedList_ command, the newly created list item has to be merged with its previous list element sibling. The question is, what's the expected behavior regarding the paragraph's style ? Should we keep it even implying we'll breaking the list element's style ? What would be the behavior if there was no previous list element sibling and the selected text will become the only list item if the newly created list ? Should we keep the paragraph's style in that case ? Depending on the answers to the questions above, should we behave differently in those cases ? Why ? IS there any spec/doc describing how to proceed in the different cases where text paragraphs are transformed into list items via the _insertOrderedList/insertUnorderedList_ command ? -- 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/179
Received on Tuesday, 11 September 2018 22:22:56 UTC