Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/373.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript TinyMCE,新添加的字体可以';不可选择_Javascript_Tinymce - Fatal编程技术网

Javascript TinyMCE,新添加的字体可以';不可选择

Javascript TinyMCE,新添加的字体可以';不可选择,javascript,tinymce,Javascript,Tinymce,我在tinyMCE上添加了一种新的字体,带有“theme\u advanced\u字体”,但它不起作用 所有其他字体都可以工作,我可以选择它并查看结果,但使用新字体时,如果文本在这种字体中,我会看到很好的结果,但我可以在tinyMCE中选择这种字体 我的代码是: $('.screen-textarea').tinymce({ script_url : '<?php echo base_url(); ?>assets/js/tiny_mc

我在tinyMCE上添加了一种新的字体,带有“theme\u advanced\u字体”,但它不起作用

所有其他字体都可以工作,我可以选择它并查看结果,但使用新字体时,如果文本在这种字体中,我会看到很好的结果,但我可以在tinyMCE中选择这种字体

我的代码是:

$('.screen-textarea').tinymce({
                        script_url : '<?php echo base_url(); ?>assets/js/tiny_mce/tiny_mce.js',

                        mode : "textareas",
                        theme : "advanced",
                        plugins : "style,inlinepopups",

                        theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,forecolor,fontselect,fontsizeselect",
                        theme_advanced_buttons2 : "",
                        theme_advanced_toolbar_location : "bottom",
                        theme_advanced_toolbar_align : "left",
                        theme_advanced_statusbar_location : "bottom",
                        theme_advanced_resizing : true,
                        theme_advanced_fonts : "ChildsPlay=ChildsPlay;"+"Academy Engraved LET=Academy Engraved LET;"+"American Typewriter=American Typewriter;"+"Arial=Arial;"+"Bradley Hand=Bradley Hand;"+"Chalkduster=Chalkduster;"+"Copperplate=Copperplate;"+"Courier=Courier;"+"Futura=Futura;"+"Georgia=Georgia;"+"Helvetica Neue=Helvetica Neue;"+"Marker Felt=Marker Felt;"+"Noteworthy=Noteworthy;"+"Optima=Optima;"+"Papyrus=Papyrus;"+"Party LET=Party LET;"+"Snell Roundhand=Snell Roundhand;"+"Times New Roman=Times New Roman;"+"Verdana=Verdana;"+"Sanchez=Sanchez;",
                        theme_advanced_font_sizes : "12px,15px,18px,22px,25px,29px,35px,41px,48px,51px,59px,66px,73px,78px,84px,88px,90px",
                        theme_advanced_text_colors : "C2C2C2,FFFFFF,000000,1c2977"
                    });
$('.screen textarea').tinymce({
脚本_url:'assets/js/tiny_mce/tiny_mce.js',
模式:“文本区域”,
主题:“高级”,
插件:“样式,inlinepopups”,
主题高级按钮1:“粗体、斜体、下划线、删除线、|、左对齐、中对齐、右对齐、全对齐、|、前景色、字体选择、字体大小选择”,
主题\高级\按钮2:“”,
主题\高级\工具栏\位置:“底部”,
主题\高级\工具栏\对齐:“左”,
主题\高级\状态栏\位置:“底部”,
主题\u高级\u大小调整:正确,
主题高级字体:“ChildsPlay=ChildsPlay;“+”Academy雕刻LET=Academy雕刻LET;“+”美国打字机=美国打字机;“+”Arial=Arial;“+”Bradley Hand=Bradley Hand;“+”白垩粉=白垩粉;“+”铜板=铜板;“+”Courier=Courier;“+”Futura=Futura;“+”乔治亚州;“+”Helvetica Neue=Helvetica Neue;“+”马克毡=马克毡+“值得注意的=值得注意的;“+”Optima=Optima;“+”Papyrus=Papyrus;“+”Party LET=Party LET;“+”Snell Roundhand=Snell Roundhand;“+”Times New Roman=Times New Roman;“+”Verdana=Verdana;“+”Sanchez=Sanchez;“,
主题高级字体大小:“12px,15px,18px,22px,25px,29px,35px,41px,48px,51px,59px,66px,73px,78px,84px,88px,90px”,
主题\高级\文本\颜色:“C2C2C2,FFFFFF,000000,1c2977”
});

字体不起作用的是Sanchez。我的计算机上有这种字体。

我想,这种字体没有加载到您的编辑器iframe中。 要加载此字体,请使用content_css tinymce config参数添加以下代码(根据需要修改)

@font-face {
    font-family: "your_font";
    font-style:  normal;
    font-weight: normal;
    src: url("http://your_server/font_directory/your_font.ttf");
}

看看其他关于这类问题的帖子,我的印象是“分号”;“在字体列表的末尾不应该出现-它应该结束……”+“Sanchez=Sanchez”不是……”+“Sanchez=Sanchez;"

我不是这方面的专家,但一直在寻找另一个问题,并在

希望这不是无关紧要的,可能会有所帮助