private function preset($name){
// Full Feature
if($name == 'full'){
return array(
'selector' => 'textarea',
'theme' => 'modern',
'plugins' => 'advlist,autolink,lists,link,image,charmap,print,preview,hr,anchor,pagebreak,
searchreplace,wordcount,visualblocks,visualchars,code,fullscreen,
insertdatetime,media,nonbreaking,save,table,contextmenu,directionality,
emoticons,template,paste,textcolor,youtube,colorpicker',
'relative_urls' => false,
'browser_spellcheck' => true,
'toolbar1' => 'insertfile, undo, redo, |, styleselect, fontselect, |, fontsizeselect, |, bold, italic, |, alignleft, aligncenter, alignright, alignjustify, |, bullist, numlist, outdent, indent',
'toolbar2' => 'link, image, media, youtube, emoticons, |, colorpicker, forecolor, backcolor, |, preview, print, code',
'language' => 'hi_IN',
'content_css' => ['http://englishcosmos.in/exam/hindifont.css'],
'font_formats' => 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Poppins= poppins,sans-serif;Indie Flower=indie flower, cursive;Hind= hind,sans-serif',
'image_advtab' => true,
'file_browser_callback' => 'elFinderBrowser'
);
}
这里的代码可以选择设置字体下拉列表,fontsize。在这里,所有来自Google的字体都有效,但印地语字体不起作用。 有什么解决方案可以使用Google或直接使用印地文字体吗? 我要在这里使用的字体是:Kurti Dev
答案 0 :(得分:0)
尝试扩展它。查看TinyMCE(link)的选项content_css
。是的,U使用它(http://englishcosmos.in/exam/hindifont.css => 404
)。在该文件中,U必须输入如下内容:
@font-face {
font-family: "Kruti Dev";
src: url("../path_to_ttf-file/kruti.ttf");
}
body{
font-family:'Kruti Dev', Verdana;
...
}