2016-11-10 31 views
-1

嘿,我如何將谷歌字體添加到我的tinymce?我想一些谷歌的字體添加到該下拉菜單,上面寫着「豐泰」(支票影像)如何將谷歌字體添加到tinymce?

已經嘗試做相同的其他問題:

我說這對我的content.min.css(只上面的身體):

@font-face{ 
    font-family:'aka_Dora'; 
    src:url('fonts/akaDora.eot') format('eot'), 
     url('fonts/akaDora.woff') format('woff'), 
     url('fonts/akaDora.ttf') format('truetype'), 
     url('fonts/akaDora.svg#akaDora') format('svg'); 
    font-weight:normal; 
    font-style:normal; 
} 

而就tinymce.init()

font_formats: 'aka_Dora=aka_Dora;' + 'Andale Mono=andale mono,times;'... 

這是發生了什麼,它出現在字體,但沒有造型,當我鍵入它像IM打字沒有任何針眼樂...

enter image description here

這是字體http://www.1001fonts.com/akadora-font.html

enter image description here

我知道有像2個或3的職位,但我無法理解:(

你能詳細解釋一下嗎?因爲我不從的CSS/JS :(

明白,與其說這是我的TinyMCE的外觀: mytinymce

這裏是我的tinymce.init:

<asp:Content ID="head" ContentPlaceHolderID="head" runat="Server"> 
    <script src="/App_Script/tinymce/js/tinymce/tinymce.min.js"></script> 
    <script> 
     tinymce.init({ 
      selector: 'textarea', 
      height: 520, 
      theme: 'modern', 
      language_url: "/App_Script/tinymcelangs/pt_PT.js", 
      resize: false, 
      force_br_newlines: true, 
      force_p_newlines : false, 
      forced_root_block : '', 
      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 colorpicker textpattern imagetools' 
      ], 
      plugin_preview_width: 750, 
      plugin_preview_height: 600, 
      menubar: false, 
      toolbar1: 'insertfile undo redo | fontselect | fontsizeselect | superscript subscript | bullist numlist outdent indent | link image table', 
      toolbar2: 'preview | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | forecolor backcolor emoticons', 
      image_advtab: true, 
      templates: [ 
       { title: 'Test template 1', content: 'Test 1' }, 
       { title: 'Test template 2', content: 'Test 2' } 
      ], 
      font_formats: 'Andale Mono=andale mono,times;' + 'Arial=arial,helvetica,sans-serif;' + 'Arial Black=arial black,avant garde;' + 'Book Antiqua=book antiqua,palatino;' + 'Comic Sans MS=comic sans ms,sans-serif;' + 'Courier New=courier new,courier;' + 'Georgia=georgia,palatino;' + 'Helvetica=helvetica;' + 'Impact=impact,chicago;' + 'Symbol=symbol;' + 'Tahoma=tahoma,arial,helvetica,sans-serif;' + 'Terminal=terminal,monaco;' + 'Times New Roman=times new roman,times;' + 'Trebuchet MS=trebuchet ms,geneva;' + 'Verdana=verdana,geneva;' + 'Webdings=webdings;' + 'Wingdings=wingdings,zapf dingbats', 
      fontsize_formats: "8pt 9pt 10pt 11pt 12pt 14pt 16pt 18pt 20pt 22pt 24pt 26pt 28pt 36pt 48pt 72pt" 

     }); 
    </script> 
</asp:Content> 
<asp:Content ID="body" ContentPlaceHolderID="body" runat="Server"> 
    <textarea id="txtMessageBody" runat="server"></textarea> 
</asp:Content> 
+0

@rlemon它不是,已經嘗試過,它失敗了 – Pedro

回答

0

已經解決了這個問題.. 。

只需要在<head>從字體添加鏈接

<link href="https://fonts.googleapis.com/css?family=Aclonica|Ranga" rel="stylesheet"/> 

而且我並不需要下載它的字體:)