本文主要是介绍summernote 添加emoji表情包,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
引入:
<link href="~/Content/summernote-master/tam-emoji/css/emoji.css" rel="stylesheet" />
<script src="~/Content/summernote-master/tam-emoji/js/config.js"></script>
<script src="~/Content/summernote-master/tam-emoji/js/tam-emoji.js"></script>
使用:
$(document).ready(function () { //emoji图片路径 document.emojiSource = '../../content/summernote-master/tam-emoji/img'; $('#Content').summernote({ height: 400, minHeight: 400, maxHeight: 400, placeholder: "请输入内容", lang: 'zh-CN', dialogsFade: true, //模态框淡入淡出 toolbar: [ ['history', ['undo', 'redo']], ['insert', ['emoji']], //emoji ['style', ['style']], ['font', ['bold', 'underline', 'clear']], ['fontname', ['fontname']], ['color', ['color']], ['para', ['ul', 'ol', 'paragraph']], ['table', ['table']], ['insert', ['link', 'picture']], ['view', ['fullscreen', 'help']], ] });
});
效果图:
附上github地址
https://github.com/trinhtam/summernote-emoji
这篇关于summernote 添加emoji表情包的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!