ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
支持图片格式和 emoji ,可通过editor.customConfig.emotions配置。 ``` <div id="div1"> <p>欢迎使用 wangEditor 富文本编辑器</p> </div> <script type="text/javascript" src="/wangEditor.min.js"></script> <script type="text/javascript"> var E = window.wangEditor var editor = new E('#div1') // 表情面板可以有多个 tab ,因此要配置成一个数组。数组每个元素代表一个 tab 的配置 editor.customConfig.emotions = [{ // tab 的标题 title: '新浪', // type -> 'emoji' / 'image' type: 'image', // content -> 数组 content: [{ alt: '坏笑', title: '坏笑', src: 'https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4d/2018new_huaixiao_org.png' }, { alt: '顶', title: '顶', src: 'https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/ae/2018new_ding_org.png' }, { alt: "微笑", title: "微笑", src: 'https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/e3/2018new_weixioa02_org.png' }, { alt: '拜拜', title: '拜拜', src: 'https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fd/2018new_baibai_thumb.png' }, { alt: '笑cry', title: '笑cry', src: 'https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/4a/2018new_xiaoku_org.png' }, { alt: '馋嘴', title: '馋嘴', src: 'https://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/fa/2018new_chanzui_org.png' }] }, { // tab 的标题 title: 'emoji', // type -> 'emoji' / 'image' type: 'emoji', // content -> 数组 content: '😀 😃 😄 😁 😆 😅 😂 😊 😇 🙂 🙃 😉 😓 😪 😴 🙄 🤔 😬 🤐'.split(/\s/) }] editor.create() ``` 温馨提示:需要表情图片可以去 https://api.weibo.com/2/emotions.json?source=1362404091 和 http://yuncode.net/code/c_524ba520e58ce30 逛一逛,或者自己搜索(请注意表情的版权)。