Welisson Posted November 9, 2013 Share Posted November 9, 2013 Hello! I have a module named Newsletter 1.4:newsletter_v1.4.zip. But after installing the module tab and loggining into backoffice the Newsletter show a textarea and i need that show a TinyMCE, (sorry my bad english), any help to put TinyMCE into this textarea? Installing NewsLetter Module: Link to comment Share on other sites More sharing options...
Welisson Posted November 9, 2013 Author Share Posted November 9, 2013 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 More sharing options...
vekia Posted November 9, 2013 Share Posted November 9, 2013 thank you for this brilliant solution, it will be helpful for other merchants here may i know what ps version you use? i marked this topic as [solved] Link to comment Share on other sites More sharing options...
nguyenhuonggtvt Posted January 27, 2016 Share Posted January 27, 2016 thank you for this brilliant solution, it will be helpful for other merchants here may i know what ps version you use? i marked this topic as [solved] Hello. I use version 1.6.x. How to add editor into module's textarea? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now