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.
>> 
>> Thoughts?
>> 
>> Harbs
> 

Reply via email to