Class jabberwerx.ui.Emoticons
Extends
jabberwerx.JWModel.
Class for working with supported emoticons
Constructor Attributes | Constructor Name and Description |
---|---|
Holds a list of supported emoticons and their corresponding image files, also provides a translate function for substituting in html img tags in place of raw emoticon text. |
Field Attributes | Field Name and Description |
---|---|
Map of supported emoticons and their corresponding image files
|
Method Attributes | Method Name and Description |
---|---|
translate(rawText)
Takes a string and substitutes emoticon image links in where matches are found.
|
- Methods borrowed from class jabberwerx.JWModel:
- applyEvent, event, shouldBeSavedWithGraph
- Methods borrowed from class jabberwerx.JWBase:
- destroy, getClassName, graphUnserialized, init, invocation, shouldBeSerializedInline, toString, wasUnserialized, willBeSerialized
Class Detail
jabberwerx.ui.Emoticons()
Holds a list of supported emoticons and their corresponding image files, also provides a translate function for substituting in html img tags in place of raw emoticon text.
Field Detail
{String:String}
emoticons
Map of supported emoticons and their corresponding image files
Method Detail
{jQueryCollection}
translate(rawText)
Takes a string and substitutes emoticon image links in where matches are found.
Example:
Example:
translate('hi ;)')
returns
['hi ', '<img src="img_file_location" title=":)" alt=":)" />']
- Parameters:
- {String|jQuery} rawText
- Text or xml to translate
- Throws:
- {InvalidRawTextFormat}
- If rawText is not a string or jQuery object.
- Returns:
- {jQueryCollection}