Encodes emoticons in the provided text as images.
Script: http://www.wlmessenger.net/api/3.5/loader.js
Feature: Messenger.Core
Namespace:
Microsoft.Live.Messenger
var domElement = Microsoft.Live.Messenger.MessengerUtility.emoticonEncode(text);
public static DOMElement EmoticonEncode(
string text
)
Parameters
- text
- Type: String
The text to encoded.
Return Value
A DOM representation of the input string with the emoticons replaced with images.
When users share content with their contacts, they often include text information
as well as emoticons like ":-)" and "8o|" to express emotion with their message. Modern
instant messaging clients often replace these character sequences with images that
better convey emotion.
This method can be used to render text information along with images for well-known
emoticons that Windows Live Messenger clients understand. Whenever a character sequence
that represents an emoticon is encountered, this method replaces the sequence with a
16x16 GIF image.
An application is advised to use this method to render text for DisplayName and
PersonalMessage properties because
there are security concerns when rendering content within a Web Browser and this method
is designed to do the rendering securely and efficiently.
This method can only be used after the SignInCompleted
event has been successfully raised.
| Exception | Condition |
|---|
| Exception | text is a null reference. |
Windows Live Messenger Web Toolkit
Supported in: 3.5, 3.1, 3.0, 2.5, 2.0
Internet Explorer 8.0, Internet Explorer 7.0, Internet Explorer 6.0, Firefox 3.5, Firefox 3.0, Firefox 2.0, Firefox 1.5, Chrome 2.0, Chrome 1.0, Safari 4.0, Safari 3.0