如何在TinyMCE 5.06版中显示表情符号?

如何在TinyMCE 5.06版中显示表情符号?,tinymce,emoticons,tinymce-5,Tinymce,Emoticons,Tinymce 5,我正在尝试使用TinyMCE 5.06版本插入表情符号,但插入时出错。在Asp.NETMVC中使用Html.Raw()时,不会出现表情符号。看起来是这样的。我怎样才能解决这个问题 //tinymce plugin and toolbar options $scope.tinymceOptions = { selector: '#post', plugins: [ "advlist

我正在尝试使用TinyMCE 5.06版本插入表情符号,但插入时出错。在Asp.NETMVC中使用Html.Raw()时,不会出现表情符号。看起来是这样的。我怎样才能解决这个问题

  //tinymce plugin and toolbar options
        $scope.tinymceOptions = {
            selector: '#post',         
            plugins: [
               "advlist autolink autoresize link image fullscreen  lists charmap paste print preview hr anchor pagebreak",
                "searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking wordcount  ",
                "table contextmenu directionality emoticons paste template spellchecker searchreplace help imagetools media "
            ], 
            mobile: {
                theme: "mobile",
                plugins: [ 'autosave', 'lists', 'autolink' ],
                toolbar: [ 'undo', 'bold', 'italic', 'styleselect' ]
            },
            toolbar: "insertfile undo redo | styleselect | bold italic underline left aligncenter alignright alignjustify | forecolor  backcolor | fontselect fontsizeselect| bullist numlist outdent indent | link image media  preview |  emoticons | searchreplace  help ",
            toolbar_items_size: 'small',
            file_picker_types: 'file image media',
            image_title: true,
            automatic_uploads: true,          
            file_picker_types: 'image',
            relative_urls: false,
            file_picker_callback: function (cb, value, meta) {
                var input = document.createElement('input');
                input.setAttribute('type', 'file');
                input.setAttribute('accept', 'image/*');
                input.onchange = function () {
                    var file = this.files[0];

                    var reader = new FileReader();
                    reader.onload = function () {

                        var id = 'blobid' + (new Date()).getTime();
                        var blobCache =  tinymce.activeEditor.editorUpload.blobCache;
                        var base64 = reader.result.split(',')[1];
                        var blobInfo = blobCache.create(id, file, base64);
                        blobCache.add(blobInfo);
                        cb(blobInfo.blobUri(), { title: file.name });
                    };
                    reader.readAsDataURL(file);
                };
                input.click();
            },

            media_url_resolver: function (data, resolve/*, reject*/) {
                if (data.url.indexOf('YOUR_SPECIAL_VIDEO_URL') !== -1) {
                    var embedHtml = '<iframe src="' + data.url +
                    '" width="400" height="400" ></iframe>';
                    resolve({html: embedHtml});
                } else {
                    resolve({html: ''});
                }
            },
            width: "98%",
        };
//tinymce插件和工具栏选项
$scope.tinymceOptions={
选择器:“#post”,
插件:[
“advlist autolink autoresize link image全屏列表charmap粘贴打印预览hr锚定页面中断”,
“searchreplace wordcount visualblocks visualchars insertdatetime媒体非中断字数”,
“表格上下文菜单方向性表情粘贴模板拼写检查器搜索替换帮助图像工具媒体”
], 
流动电话:{
主题:“手机”,
插件:[“自动保存”、“列表”、“自动链接”],
工具栏:[“撤消”、“粗体”、“斜体”、“样式选择”]
},
工具栏:“insertfile undo redo | styleselect |粗体斜体下划线左对齐居中对齐右对齐对齐对齐对齐|前景色背景| fontselect fontsizeselect | bullist numlist outdent缩进|链接图像媒体预览|表情|搜索替换帮助”,
工具栏项目大小:“小”,
文件\u选择器\u类型:“文件图像媒体”,
图片标题:正确,
自动上传:正确,
文件\u选择器\u类型:“图像”,
相对URL:false,
文件选择器回调:函数(cb、值、元){
var input=document.createElement('input');
input.setAttribute('type','file');
setAttribute('accept','image/*');
input.onchange=函数(){
var file=this.files[0];
var reader=new FileReader();
reader.onload=函数(){
变量id='blobid'+(新日期()).getTime();
var blobCache=tinymce.activeEditor.editorUpload.blobCache;
var base64=reader.result.split(',')[1];
var blobInfo=blobCache.create(id,文件,base64);
blobCache.add(blobInfo);
cb(blobInfo.blobUri(),{title:file.name});
};
reader.readAsDataURL(文件);
};
输入。单击();
},
媒体url解析器:函数(数据、解析/*、拒绝*/){
if(data.url.indexOf('YOUR_SPECIAL_VIDEO_url')!=-1){
var-embedHtml='';
解析({html:embedHtml});
}否则{
解析({html:'});
}
},
宽度:“98%”,
};

我希望输出是检查用于处理HTML字符串的字符集。当您意外地将复杂字符集(emoji所需)中的字符串(如Unicode或UTF-8)转换为ASCII等更简单的字符集时,可能会发生这种情况。

有此问题

entity_encoding: "numeric"
这会将表情符号作为HTML Dec代码发送到DB,然后当您将其显示为HTML Dec代码时,浏览器会将其转换为表情符号