The discussion revolves around using Discourse’s helper.h functions to create HTML elements with specific formatting. loginerror is trying to achieve this:
<div>
<p>This text <i>is italic</i> </p>
</div>
Using the h function, and is close with the following code, but it’s not rendering both the text and the italicized part:
david explains that the h function parameters are tagName, properties, children, and children can either be a single node or an array of multiple nodes. He provides the correct solution:
loginerror thanks david and mentions the idea of introducing a simple converter from HTML to h function, which would speed up development. awesomerobot provides a link to a GitHub repository showing an example of using a template with the h function.
The parameters to the h function are tagName, properties, children. You can skip properties if you want, and just use tagName, children. Children can either be a single node, or an array of multiple nodes.