joostjoost Posted December 6, 2016 Share Posted December 6, 2016 Hello, I have added the tinyMCE rich text editor to my prestashop store but I can not use it. prestashop version: 1.6.1.3 I have deleted browser and shop cache. I also changed the validate file. This is the only thing I see when I open every cms or product page. Here is my code, can someone please help me solving this problem? 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...
Martin Uker K Posted December 6, 2016 Share Posted December 6, 2016 Hi! I have yet to understand the problem, so here are my questions : You have added something that is already here no? Are you talking about frontend or Backend? Backend should already have a TinyMCE editor... Do you have any error in JS console? Any URL for your website? Martin. Link to comment Share on other sites More sharing options...
joostjoost Posted December 6, 2016 Author Share Posted December 6, 2016 Hello Martin, Thank you for your response, I have added a extended tinyMCE text editor to the backend of the store. I have done it with this tutorial: https://www.prestashop.com/forums/topic/318425-tutorial-tinymce-rich-text-editor-extended-version/ If you look at my attached picture in the first post you see that I am not able to edit my text anymore. Bas Link to comment Share on other sites More sharing options...
Martin Uker K Posted December 6, 2016 Share Posted December 6, 2016 Oh, Vekia Guide. That guy is good, even tho he's a Sith. Anyway. Do you have any error in the JavaScript Console (F12)? Martin. Link to comment Share on other sites More sharing options...
joostjoost Posted December 7, 2016 Author Share Posted December 7, 2016 When I use JavaScript Console I see several faults, see attached picture. image: https://postimg.org/image/bk3ecs0rb/ Link to comment Share on other sites More sharing options...
Martin Uker K Posted December 7, 2016 Share Posted December 7, 2016 The first error seems weird. Where does dh42.js come from? Martin. Link to comment Share on other sites More sharing options...
joostjoost Posted December 8, 2016 Author Share Posted December 8, 2016 Hello Martin, This is the code I see when I open dh42.js it is from prestashop theme extender module. $(document).ready(function() { // Change it to yours var affiliate_url = '002'; var licontent = '<li class="maintab" id="maintab-Dh42" data-submenu="99">'; licontent += '<a style="background-color:#ff5450; color: white" href="javascript:void(0)" class="title">'; licontent += '<i class="icon-question-sign" style="color:white; padding-left: 7px"></i><span>Get Prestashop Support</span>'; licontent += '</a>'; licontent += '</li>'; $('#nav-sidebar .menu').append(licontent); $('#maintab-Dh42 a').click(function(e) { e.preventDefault(); if($('#dh42-support-container').length == 0) $('body').append('<div id="dh42-support-container" class="modal fade"><div class="modal-dialog" style="height:75%;width:75%""><iframe src="https://dh42.com/support/aff.php?aff='+affiliate_url+'&support=true&iframe=yes" width=100% height=100%></iframe><style>#main-header {display:none}</style></div></div>'); $('#dh42-support-container').modal('show'); }); }); Link to comment Share on other sites More sharing options...
tresorsdargan Posted June 3, 2018 Share Posted June 3, 2018 same for me, dh42.js javascript intrusion support, open files and deleted in prestaqna.php 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