Maybe a simple question, but it stopped me for a bit
How to achieve this using Discourse helper.h function?
<div>
<p>This text <i>is italic</i> </p>
</div>
The closest I got is this:
html() {
return [ h('div'),
h('p', "This text" + h('i', "is italic"))
]
}
Which returns this:
Otherwise, a few other variants I tried either return This text
or is italic
, but not both
For example, this:
html() {
return [ h('div'),
h('p', "This text", [h('i', "is italic")])
]
}
returns just the is italic
Almost there?
This:
html() {
return [ h('div', ),
h('p', [h('i', "is italic"), "This text"])
]
}
Gives me this