javascript - How to add google fonts to tinymce? -


this question has answer here:

hey how add google fonts tinymce ? want add google fonts dropdown says "fonte"(check image)

already tried same of other question:

i added on content.min.css (just above body):

@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; } 

and on tinymce.init()

font_formats: 'aka_dora=aka_dora;' + 'andale mono=andale mono,times;'... 

this happens, appears font no styling , when type it's im typing without style...

enter image description here

this font http://www.1001fonts.com/akadora-font.html

enter image description here

i know there 2 or 3 posts of couldn't understand :(

could explain detail ? because don't understand css/js :(

this how tinymce looks: mytinymce

here 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> 

already fixed this...

just needed add on <head> link fonts

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

and don't need download fonts work :)


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -