According to Sina Weibo's emoticons plug-in, the plug-in provides an implementation in jquery mode. Features: one-time initialization can be globally controlled (On, off). You can remotely retrieve emoticon data. This allows you to convert emoticon codes. [You can flexibly control the trigger dom.] The initialization code is as follows: $. expBlock. initExp ({/... syntaxHighlighter. all ();
According to Sina Weibo's emoticons plug-in, the plug-in provides an implementation in jquery mode.
Features:
One-time Initialization
Global Control (enable or disable)
You can remotely retrieve emoticon data.
Converts emoticon codes.
[Trigger dom with flexible user control]
The initialization code is as follows:
$. ExpBlock. initExp ({
// User expression structure data
ExpData: [{name: 'default', icons: [{url :".. /resources/js/plugins/exp/img/zz2_thumb.gif ", title:" woven "},{ url :".. /resources/js/plugins/exp/img/horse2_thumb.gif ", title:" Shenma "}]
// Contains textarea and emoticon-triggered exp-holder
Holder: '. exp-holder ',
// The textarea input dom in exp-holder. The default value is textarea,
Textarea: 'textea ',
// Trigger dom
Trigger: '. exp-block-trigger ',
// The number of emojis displayed on each page
Kgnum: 5,
// Relative location (absolute) | fixed window (fixed)
PosType: 'absolute ',
// Emoticons
ZIndex: '20140901'
});
Make the expression invalid
$. ExpBlock. disableExp ();
Enable facial expression restart
$. ExpBlock. enableExp ();
// Replace the emoticons of the [Smile] class in the string with tags
Var s = $. expBlock. textFormat (val );
Complete html call example
Emotion