Jump to content

[SOLVED] Add TinyMCE to textarea in NewsLetter module - Admin tab


Welisson

Recommended Posts

I solved this problem:

 

open the file:  newsletter_v1.4\admin\tabs\AdminNewsletter.php, find <textarea> add: class="rte" to <textarea> and after </textarea>  tag add this script:
       
 
<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce/jscripts/tiny_mce/jquery.tinymce.js"></script>  
  <script type="text/javascript">  
  function tinyMCEInit(element)  
  {  
   $().ready(function() {  
    $(element).tinymce({  
     // Location of TinyMCE script  
     script_url : \''.__PS_BASE_URI__.'js/tinymce/jscripts/tiny_mce/tiny_mce.js\',  
     // General options  
     theme : "advanced",  
     plugins : "safari,pagebreak,style,layer,table,advimage,advlink,inlinepopups,media,searchreplace,contextmenu,paste,directionality,fullscreen",  
     // Theme options  
     theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",  
     theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,,|,forecolor,backcolor",  
     theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,media,|,ltr,rtl,|,fullscreen",  
     theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,pagebreak",  
     theme_advanced_toolbar_location : "top",  
     theme_advanced_toolbar_align : "left",  
     theme_advanced_statusbar_location : "bottom",  
     theme_advanced_resizing : false,  
     content_css : "'.__PS_BASE_URI__.'themes/'._THEME_NAME_.'/css/global.css",  
     width: "582",  
     height: "auto",  
     font_size_style_values : "8pt, 10pt, 12pt, 14pt, 18pt, 24pt, 36pt",  
     // Drop lists for link/image/media/template dialogs  
     template_external_list_url : "lists/template_list.js",  
     external_link_list_url : "lists/link_list.js",  
     external_image_list_url : "lists/image_list.js",  
     media_external_list_url : "lists/media_list.js",  
     elements : "nourlconvert",  
     convert_urls : false,  
     language : "'.(file_exists(_PS_ROOT_DIR_.'/js/tinymce/jscripts/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en').'"  
    });  
   });  
  }  
  tinyMCEInit(\'textarea.rte\');  
  </script> 

enjoy!

Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...