Alright, I've been working on a HTML editor for an application, but lists aren't behaving properly.
I'm using WebBrowser.Document.Body.SetAttribute("contenteditable", "true"); to make the WebBrowser editable.
I'm creating lists by using ExecCommand("InsertUnorderedList", false, null).
I'm also trapping KeyDown and checking for the enter key. If shift is also pressed, inserting a BR and if not ExecCommand("InsertParagraph", false, null).
However, I want it so that when in a list (ordered or unordered - which I can already detect), a new list item is created at the cursor, carrying what is to the right of the cursor down to the next list item.
Is there a way I can get the WebBrowser to do this?
I'm using WebBrowser.Document.Body.SetAttribute("contenteditable", "true"); to make the WebBrowser editable.
I'm creating lists by using ExecCommand("InsertUnorderedList", false, null).
I'm also trapping KeyDown and checking for the enter key. If shift is also pressed, inserting a BR and if not ExecCommand("InsertParagraph", false, null).
However, I want it so that when in a list (ordered or unordered - which I can already detect), a new list item is created at the cursor, carrying what is to the right of the cursor down to the next list item.
Is there a way I can get the WebBrowser to do this?