fitgura Posted June 26, 2015 Share Posted June 26, 2015 Hello all! I have read the whole forum about How to extend the poor tinyMCE editor functions under PS 1.6 but still have no effect under 1.6.014 version https://mypresta.eu/en/art/prestashop-16/extended-rich-text-editor.html I did everything, changed the files, delete the cache, .htaccess file.. but all the icons just disappeared above the editor area! Is there any solution to get back the old good extended tiny please? I think this is really important feature of a website Help please thx Link to comment Share on other sites More sharing options...
vekia Posted June 26, 2015 Share Posted June 26, 2015 if icons disappeared - this means that js file wasn't saved properly can you please share contents of your js file that you changed? + what file exactly you modified? Link to comment Share on other sites More sharing options...
sanax Posted June 26, 2015 Share Posted June 26, 2015 if icons disappeared - this means that js file wasn't saved properly can you please share contents of your js file that you changed? + what file exactly you modified? I have the same problem in 1.6.0.1.4 I followed your instructions and replaced /js/tinymce.inc.js but the editor doesn't extend. I also changed the validate.php file as you've suggested. No luck Link to comment Share on other sites More sharing options...
fitgura Posted July 3, 2015 Author Share Posted July 3, 2015 Hello Sanax! Just change the whole tinymce.ins.js file to this one, clean the cache and everything will be okay.. function tinySetup(config) { if(!config) config = {}; //var editor_selector = 'rte'; if (typeof config.editor_selector != 'undefined') config.selector = '.'+config.editor_selector; default_config = { selector: ".rte" , plugins : "visualblocks, preview searchreplace print insertdatetime, hr charmap colorpicker anchor code link image paste pagebreak table contextmenu filemanager table code media autoresize textcolor emoticons", browser_spellcheck : true, toolbar2 : "newdocument,print,|,bold,italic,underline,|,strikethrough,superscript,subscript,|,colorpicker,|,bullist,numlist,outdent,indent|,table,|,cut,copy,paste,searchreplace,|,blockquote,|,undo,redo,", toolbar1 : "styleselect,|,formatselect,|,fontselect,|,fontsizeselect,", toolbar3 : "code,|,link,unlink,anchor,|,image,emoticons,media,|,inserttime,|,preview visualblocks,|,charmap,|,hr,|,alignleft,aligncenter,alignright,alignfull,formatselect,", toolbar4 : "visualblocks,|,charmap,|,hr,|,alignleft,aligncenter,alignright,alignfull,formatselect,", external_filemanager_path: ad+"/filemanager/", filemanager_title: "File manager" , external_plugins: { "filemanager" : ad+"/filemanager/plugin.min.js"}, language: iso, skin: "prestashop", statusbar: false, relative_urls : false, convert_urls: false, entity_encoding: "raw", extended_valid_elements : "em[class|name|id]", menu: { edit: {title: 'Edit', items: 'undo redo | cut copy paste | selectall'}, insert: {title: 'Insert', items: 'media image link | pagebreak'}, view: {title: 'View', items: 'visualaid'}, format: {title: 'Format', items: 'bold italic underline strikethrough superscript subscript | formats | removeformat'}, table: {title: 'Table', items: 'inserttable tableprops deletetable | cell row column'}, tools: {title: 'Tools', items: 'code'} } }; $.each(default_config, function(index, el) { if (config[index] === undefined ) config[index] = el; }); tinyMCE.init(config); } Link to comment Share on other sites More sharing options...
sanax Posted July 4, 2015 Share Posted July 4, 2015 Thank you for the reply! Changed the the file, clean cache and still no luck! Link to comment Share on other sites More sharing options...
vekia Posted July 5, 2015 Share Posted July 5, 2015 you cleared cache in shop or in browser? the second one is the most important btw i updated this article several days ago and this is proper code: function tinySetup(config) { if(!config) config = {}; var editor_selector = 'rte'; //if (typeof config['editor_selector'] !== 'undefined') //var editor_selector = config['editor_selector']; if (typeof config['editor_selector'] != 'undefined') config['selector'] = '.'+config['editor_selector']; //safari,pagebreak,style,table,advimage,advlink,inlinepopups,media,contextmenu,paste,fullscreen,xhtmlxtras,preview default_config = { selector: ".rte" , plugins : "visualblocks, preview searchreplace print insertdatetime, hr charmap colorpicker anchor code link image paste pagebreak table contextmenu filemanager table code media autoresize textcolor emoticons", toolbar2 : "newdocument,print,|,bold,italic,underline,|,strikethrough,superscript,subscript,|,forecolor,colorpicker,backcolor,|,bullist,numlist,outdent,indent", toolbar1 : "styleselect,|,formatselect,|,fontselect,|,fontsizeselect,", toolbar3 : "code,|,table,|,cut,copy,paste,searchreplace,|,blockquote,|,undo,redo,|,link,unlink,anchor,|,image,emoticons,media,|,inserttime,|,preview ", toolbar4 : "visualblocks,|,charmap,|,hr,", external_filemanager_path: ad+"/filemanager/", filemanager_title: "File manager" , external_plugins: { "filemanager" : ad+"/filemanager/plugin.min.js"}, extended_valid_elements: 'pre[*],script[*],style[*]', valid_children: "+body[style|script|iframe|section],pre[iframe|section|script|div|p|br|span|img|style|h1|h2|h3|h4|h5],*[*]", valid_elements : '*[*]', force_p_newlines : false, cleanup: false, forced_root_block : false, force_br_newlines : true, convert_urls:true, relative_urls:false, remove_script_host:false, menu: { edit: {title: 'Edit', items: 'undo redo | cut copy paste | selectall'}, insert: {title: 'Insert', items: 'media image link | pagebreak'}, view: {title: 'View', items: 'visualaid'}, format: {title: 'Format', items: 'bold italic underline strikethrough superscript subscript | formats | removeformat'}, table: {title: 'Table', items: 'inserttable tableprops deletetable | cell row column'}, tools: {title: 'Tools', items: 'code'} } } $.each(default_config, function(index, el) { if (config[index] === undefined ) config[index] = el; }); tinyMCE.init(config); } $().ready(function() { tinySetup(); }); Link to comment Share on other sites More sharing options...
sanax Posted July 5, 2015 Share Posted July 5, 2015 (edited) Thank you! Yes, I cleaned the shop's cache in the back-office. I tried your code and it works in another shop I have but still not in the one I need it. I was wondering if I made some changes in other files following previous instructions. Somewhere someone said we need to make changes to the Validation.php file or validate.js? Very weird that it works in one shop and not another. I've tried it in both js and admin/js directories. [EDITED] I cleared the cache again and seems to be working now. (Just to notice - 3 blocks are missing but it is no big deal) Edited July 5, 2015 by sanax (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