改造

将Emoji表情添加到项目中

北慕城南 提交于 2020-04-06 21:02:28
哈哈,进入正题,项目需要发emoji表情,于是,我的任务开始了~ 效果图镇楼 选择完需要的表情,点击消息预览就可以看到效果了,有一个微笑表情是QQ表情~~ 可以不用管它。 找了跟emoji相关了好多插件,找到了 jQuery_EmojiPicker 这个插件,然后研究了一下。 源下载地址 http://www.jb51.net/jiaoben/375022.html 插件修改 1.插件初始化后将其原本的输入框隐藏。 index.html,67行。 <script> $(function() { // Initializes and creates emoji set from sprite sheet window.emojiPicker = new EmojiPicker({ emojiable_selector: '[data-emojiable=true]', assetsPath: 'lib/img/', popupButtonClasses: 'fa fa-smile-o' }); // Finds all elements with `emojiable_selector` and converts them to rich emoji input fields // You may want to delay this step if you have