Forse una domanda semplice, ma mi ha fatto bloccare un po’ ![]()
Come si ottiene questo risultato usando la funzione helper.h di Discourse?
<div>
<p>Questo testo <i>è in corsivo</i> </p>
</div>
La cosa più vicina che sono riuscito a ottenere è questa:
html() {
return [ h('div'),
h('p', "Questo testo" + h('i', "è in corsivo"))
]
}
Che restituisce questo:
![]()
In alternativa, alcune altre varianti che ho provato restituiscono solo Questo testo o è in corsivo, ma non entrambi ![]()
Ad esempio, questa:
html() {
return [ h('div'),
h('p', "Questo testo", [h('i', "è in corsivo")])
]
}
restituisce solo è in corsivo
![]()
Quasi arrivato?
Questa:
html() {
return [ h('div', ),
h('p', [h('i', "è in corsivo"), "Questo testo"])
]
}
Mi dà questo ![]()
![]()