This question discusses sending messages with node-xmpp: Connecting to Google Talk over XMPP on Node.js
Anyone know how to get an HTML formatted message. The library they are using escapes the HTML in a node module called ltx.
This question discusses sending messages with node-xmpp: Connecting to Google Talk over XMPP on Node.js
Anyone know how to get an HTML formatted message. The library they are using escapes the HTML in a node module called ltx.
See XEP-0071. Make sure your HTML is valid XML (XHTML), then embed like this:
<message>
<body>Wow, I'm green with envy!</body>
<html xmlns='http://jabber.org/protocol/xhtml-im'>
<body xmlns='http://www.w3.org/1999/xhtml'>
<p style='font-size:large'>
<em>Wow</em>, I'm <span style='color:green'>green</span>
with <strong>envy</strong>!
</p>
</body>
</html>
</message>
Note that the plain text is also included for clients that can't render XHTML.