At.js

通过:+表情符号的某个字母来调用表情,也可以通过@来自动完成@某人,如@张,@你

And!! it support ContentEditable mode too!!

Try here now! :h

和ueditor结合使用

', insertTpl: '${name}', displayTpl: "
  • ${name} ${email}
  • ", limit: 200 } var emoji_config = { at: ":", data: emojis, displayTpl: "
  • ${name}
  • ", insertTpl: ':${key}:', delay: 400 } $inputor = $('#inputor').atwho(at_config).atwho(emoji_config); $inputor.caret('pos', 47); $inputor.focus().atwho('run'); emoji_config.insertTpl = "" $('#editable').atwho(at_config).atwho(emoji_config); ifr = $('#iframe1')[0] doc = ifr.contentDocument || iframe.contentWindow.document if ((ifrBody = doc.body) == null) { // For IE doc.write("") ifrBody = doc.body } ifrBody.contentEditable = true ifrBody.id = 'ifrBody' ifrBody.innerHTML = 'For WYSIWYG which using iframe such as ckeditor' $(ifrBody).atwho('setIframe', ifr).atwho(at_config) });