IPlainTextModel should work. I’m in the middle of adding a RichTextArea component which wraps a div.
More on that in my next response. On Nov 8, 2016, at 6:05 PM, Alex Harui <aha...@adobe.com> wrote: > On 11/8/16, 2:39 AM, "Harbs" <harbs.li...@gmail.com> wrote: > >> It also feels like “editable" should be a first class citizen… >> >> On Nov 8, 2016, at 12:37 PM, Harbs <harbs.li...@gmail.com> wrote: >> >>> On a similar vein: >>> >>> ITextModel and TextModel seems to be flawed in the fact that it assumes >>> that all text can be html text. This is clearly not true for input and >>> textarea HTML elements. >>> >>> On Nov 8, 2016, at 12:03 PM, Harbs <harbs.li...@gmail.com> wrote: >>> >>>> I don’t think TextArea as it stands should have an html property. >>>> >>>> Currently, TextArea is a thin wrapper on <textarea> on the HTML side. >>>> <textarea> does not support innerHTML the way other HTML elements do. >>>> It’s basically just a multi-line input. >>>> >>>> Right now, the html property would cause an error on the HTML side if >>>> it would be used and there’s no way to cleanly implement it. As I see >>>> it, there’s two options: >>>> 1. Remove the html property from TextArea. >>>> 2. Make the TextArea wrap a div instead of a textarea element. >>>> >>>> The approach that makes sense to me is: >>>> 1. Remove the html property. >>>> 2. Create a new RichTextArea component which is a div on the the HTML >>>> side and sets contenteditable to true if it’s an editable one. > > Gee, I never noticed that TextArea didn't have an innerHTML property. The > MDN makes it look like it does. > > How about introducing an IPlainTextModel? I think this second suggestion > is the better one. > > > -Alex