sk8hack Posted April 4, 2010 Share Posted April 4, 2010 I was having problems when inserting tables, so I decided to change the WYSIWYG editor to one that I consider the best.First you need to download CKEditor here http://ckeditor.com/downloadthen extract the folder called ckeditor in /js/Go to /ADMIN/tabsNow open AdminCMS.php AND AdminProducts.phpLook for < 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 : true, content_css : "'.__PS_BASE_URI__.'themes/'._THEME_NAME_.'/css/global.css", // 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> Replace it to < script type="text/javascript" src="'.__PS_BASE_URI__.'js/ckeditor/ckeditor.js">< /script> < script type="text/javascript" src="'.__PS_BASE_URI__.'js/ckeditor/adapters/jquery.js">< /script> [removed] $().ready(function() { $(\'textarea.rte\').ckeditor(); }); toggleVirtualProduct(getE(\'is_virtual_good\')); < /script> That's it, I don't remember if there are more sections which use WYSIWYG editor. If so, please correct me.Thanks Link to comment Share on other sites More sharing options...
goodsdealer Posted April 21, 2010 Share Posted April 21, 2010 what line? Link to comment Share on other sites More sharing options...
sk8hack Posted April 21, 2010 Author Share Posted April 21, 2010 search for "tinymce.js" Link to comment Share on other sites More sharing options...
goodsdealer Posted April 21, 2010 Share Posted April 21, 2010 does not work!!? i replaced all but looks like there is mistake somewere in the code Link to comment Share on other sites More sharing options...
sk8hack Posted April 22, 2010 Author Share Posted April 22, 2010 yes, apparently the forum doesn't allow scrip tags, replace: [removed]to < script type="text/javascript"> Link to comment Share on other sites More sharing options...
uddhava Posted June 1, 2010 Share Posted June 1, 2010 CKeditorI have installed CKeditor with succes with the help of this thread.I managed to install v3.3.It is really simple actually:download the latest CKeditor : http://ckeditor.com/downloadInstall it in : [root] / js folderSo for example : /myshop/js/ckeditorThen edit the /admin/tabs/AdminCMS.php AND /admin/tabs/AdminProducts.phpinsert the code as suggested in the 1st post.And then it should work... :-)But now comes the 2nd part which is also needed.Installing CKfinder. CKfinderWith this extension you can add uploads to your CKeditor.Download it here : http://ckfinder.com/downloadInstall it in : [root] / js folder. So for example : /myshop/js/ckfinderEdit ckeditor/config.jsAdd the following lines: CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; // added code for ckfinder -----> config.filebrowserBrowseUrl = '../ckfinder/ckfinder.html'; config.filebrowserImageBrowseUrl = '../ckfinder/ckfinder.html?Type=Images'; config.filebrowserFlashBrowseUrl = '../ckfinder/ckfinder.html?Type=Flash'; config.filebrowserUploadUrl = '../ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'; config.filebrowserImageUploadUrl = '../ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images'; config.filebrowserFlashUploadUrl = '../ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'; // end: code for ckfinder ------> }; Now i am stuck with this. Uploads do not work yet.I think this is because of a wrong PATH (for example ../ckfinder/ckfinder.html). At least the browser is complaining ;-)Tomorrow moreys Link to comment Share on other sites More sharing options...
ysco Posted June 10, 2010 Share Posted June 10, 2010 @ uddhavaDid you find the solution yet about the upload problem ?If so please tell me how to do.Thanks for sharing your info so far.@sk8hackThanks for sharing your info on this beautiful editor.Edit: It is not working for me either,I get this in BO < script type="text/javascript" src="/js/ckeditor/ckeditor.js">< /script> < script type="text/javascript" src="/js/ckeditor/adapters/jquery.js">< /script> < script type="text/javascript"> $().ready(function() { $('textarea.rte').ckeditor(); }); toggleVirtualProduct(getE('is_virtual_good')); < /script> I replaced also the removed with the script line as mentioned, and also want to say that it is not correct posted .This " posted in this line < script type=“text/javascript”> is also not showing correct it must be < script type="text/javascript"> Any advice on this one ?ysco.. Link to comment Share on other sites More sharing options...
uddhava Posted June 12, 2010 Share Posted June 12, 2010 No, i did not solve it.But i have opened another thread that deals with CKeditor and CKFinder.I will update also there.http://www.prestashop.com/forums/viewthread/57351 Link to comment Share on other sites More sharing options...
Recommended Posts