Автор: vs6262
Дата сообщения: 21.04.2016 23:04
		конфигурация tinyMCE  
  
 
Код:     <script> 
 tinymce.init({ 
   selector: "#m_s_g", 
   width : 838, 
   height: 260, 
   resize: false, 
   plugins: [ 
       "advlist autolink lists link image charmap print preview anchor", 
       "searchreplace visualblocks code fullscreen", 
       "insertdatetime media table contextmenu paste", 
       "textcolor legacyoutput image imagetools" 
   ], 
   imagetools_toolbar: "rotateleft rotateright | flipv fliph | editimage imageoptions", 
   toolbar: "undo redo | bold italic | fontselect fontsizeselect | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | link image", 
   paste_data_images: true, 
     images_upload_handler: function (blobInfo, success, failure) { 
       // no upload, just return the blobInfo.blob() as base64 data 
       success("data:" + blobInfo.blob().type + ";base64," + blobInfo.base64()); 
     }, 
   convert_urls: false, 
   content_css: 'fonts.css', 
   theme_advanced_font_sizes : "8px,10px,12px,14px,16px,18px,20px,24px,32px,36px", 
   theme_advanced_fonts : "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;"+ 
                          "Century Gothic=century_gothic;"+ 
                          "Georgia=georgia,palatino;"+ 
                          "Gill Sans MT=gill_sans_mt;"+ 
                          "Gill Sans MT Bold=gill_sans_mt_bold;"+ 
                          "Gill Sans MT BoldItalic=gill_sans_mt_bold_italic;"+ 
                          "Gill Sans MT Italic=gill_sans_mt_italic;"+ 
                          "Helvetica=helvetica;"+ 
                          "Impact=impact,chicago;"+ 
                          "Iskola Pota=iskoola_pota;"+ 
                          "Iskola Pota Bold=iskoola_pota_bold;"+ 
                          "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", 
  file_picker_callback: function (callback, value, meta) 
         { 
             $('#html-editor input').click(); 
             //how to get selected image data and add to editor? 
                 $('#Iimage').change(function() { 
                   var file = this.files[0]; 
                   var reader = new FileReader(); 
                   reader.onload = function(e) { 
                     callback(e.target.result, { 
                       alt: '' 
                     }); 
                   }; 
                   reader.readAsDataURL(file); 
                 }).change(); 
                  
         } 
  
 }); 
     </script>