On 12/13/16, 4:15 PM, "[email protected] on behalf of Carlos Rovira" <[email protected] on behalf of [email protected]> wrote:
>Hi Alex, > >I remember I tried this approach some time ago and it didn't work, maybe >it >was since I was returning Text and not a WrappedHTMLElement. >Now it compiles and work in example but I have a new problem. It seems a >TextNode is always a leaf and can't have html tags for that reason the >text >in a running example is: > >Lorem ipsum dolor sit <b>amet</b>, consectetur <i>adipiscing elit</i>. >Mauris sagittis pellentesque lacus eleifend lacinia... > >I'm trying to see how to solve this problem Yes, I think that Text is plain text. In your proposed content, you are really specifying <Text>Lorem ipsum dolor sit</Text> <b>âmet</b> <Text>, consectetur</Text> <i>adipiscing elit</i> <Text>Mauris sagittis pellentesque lacus eleifend lacinia...</Text> The issue may be that there are multiple ways to specify and operate on innerHTML. If you want to set it directly, then you shouldn't be able to specify any other children. Hence my earlier suggestion to have a DivWithInnerHTML component that doesn't subclass Container and only has an innerHTML property. -Alex
