wicem Posted October 31, 2012 Share Posted October 31, 2012 J'ai un problème avec l'éditeur tinymce sur la version 1.5. Tout mes texctarea des modules qui n'utilisent pas une classe pour instancier le formulaire dans laquel sera appelée l'éditeur Tinymce dans le Back Office s'affichent sans l'editeur. j'ai l'erreur suivante : ReferenceError: tinyMCE is not defined chrome://firebug/content/blank.gif tinyMCE.init({ J'utilise la version 2.0 du module navmegadrownevo qui a été mise à jour pour etre compatible avec ps 1.5 $this->_html .=' <script type="text/javascript">id_language = Number('.$defaultLanguage.');</script> <script type="text/javascript" src="'.$this->_path.'views/js/jquery-sortable.js"></script> <script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ mode : "textareas", 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", document_base_url : "'.__PS_BASE_URI__.'", width: "600", 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\'); dans le module ya bien les meme paramètres que tu spécifie ci dessus. Par contre le dossier jscripts n'existe pas dans la racine du root/js/tinymce Est ce que quelqu'un peux me dire d'ou ca vient ?? Merci Wicem Link to comment Share on other sites More sharing options...
wicem Posted November 2, 2012 Author Share Posted November 2, 2012 Hello je viens de trouver la réponse sur ce post : http://www.prestashop.com/forums/topic/188836-impossible-de-faire-marcher-tinymce-sur-un-module/ au cas ou un autre en aurait besoin. Link to comment Share on other sites More sharing options...
saraspady Posted January 9, 2013 Share Posted January 9, 2013 (edited) Bonjour, Il faudrait ajouter la fonction tinySetup(); comme ci-dessous. <script type="text/javascript">id_language = Number('.$defaultLanguage.');tinySetup();</script> <script type="text/javascript" src="'.$this->_path.'views/js/jquery-sortable.js"></script> <script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script> Cordialement, Edited January 9, 2013 by saraspady (see edit history) 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