Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
neoXMPP #1
Member since May 2013 · 14 posts
Group memberships: Members
Show profile · Link to this post
Subject: c# examples for sending formatted chat
Are there any c# examples to send formatted chat messages? (Bold, Italics, Images etc) ?
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
for formatted messages in XMPP we XHTML content. This is decribed in XEP-0071: XHTML-IM

Here is an example for building a simple formatted message.
You also have to include the plain text as well for clients which support no formatted messages.
  1. var msg2 = new Message
  2.  {
  3.       Body = "Hello World",
  4.       XHtml = new Html
  5.                  {
  6.                      Body = new Body {InnerXHtml = "<p>Hello World</p>"}
  7.                  }
  8.  };
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS