lateral Posted January 21, 2015 Share Posted January 21, 2015 (edited) Hi guys I need to insert the following code in the description of my products. It is a Call to Action button that contains a telephone number so that mobile users can simply press the button and call me. The problem I have is that if I use the Editor (CKEditor) that is part of Store Commander (I use SC for my BO editing etc), it inserts the following code properly and everything works fine. <p><a class="small button" href="tel:+61299731783"><img alt="" src="/img/cms/button(2).png" style="width:191px;height:47px;" /></a></p> If I use the inbuilt TinyMCE editor of Prestashop (I extended it using Vekia's excellent tutorial (http://mypresta.eu/en/art/prestashop-16/extended-rich-text-editor.html) it is stripping out the "href" part of the code... <p><a class="small button"><img alt="" src="../img/cms/button(2).png" style="width: 191px; height: 47px;" /></a></p> If there a way to stop this happening??? Thanks Regards Greg Edited January 21, 2015 by lateral (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 21, 2015 Share Posted January 21, 2015 post #6 https://www.prestashop.com/forums/topic/341056-solved-prestashop-16-extended-tinymce-editor-and-forms/ Link to comment Share on other sites More sharing options...
lateral Posted January 21, 2015 Author Share Posted January 21, 2015 Thanks Vekia What is the name and location of the file that I need to add the additional params to?? Link to comment Share on other sites More sharing options...
vekia Posted January 21, 2015 Share Posted January 21, 2015 /js/tinymce.inc.js add code right after: valid_elements : '*[*]', force_p_newlines : false, cleanup: false, forced_root_block : false, force_br_newlines : true, Link to comment Share on other sites More sharing options...
lateral Posted January 22, 2015 Author Share Posted January 22, 2015 Hi Vekia This is the contents of my tinymce.inc.js file...it does not have a "valid_elements" section: 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 : "colorpicker link image paste pagebreak table contextmenu filemanager table code media autoresize textcolor", toolbar1 : "code,|,bold,italic,underline,strikethrough,|,alignleft,aligncenter,alignright,alignfull,formatselect,|,blockquote,colorpicker,pasteword,|,bullist,numlist,|,outdent,indent,|,link,unlink,|,cleanup,|,media,image", toolbar2: "", 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, 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...
AnonymousUser Posted February 11, 2015 Share Posted February 11, 2015 I have the same problem. Did you ever find a solution? Link to comment Share on other sites More sharing options...
lateral Posted February 11, 2015 Author Share Posted February 11, 2015 No, I did not find a solution and reverted back to the original version of TinyMCE Link to comment Share on other sites More sharing options...
AnonymousUser Posted February 11, 2015 Share Posted February 11, 2015 It works in the original version for you? I'm using it and still have the problem. Link to comment Share on other sites More sharing options...
lateral Posted February 11, 2015 Author Share Posted February 11, 2015 I stopped trying to use TinyMCE and stuck with using CKEditor within Storecommander... Link to comment Share on other sites More sharing options...
Martin Uker K Posted February 3, 2017 Share Posted February 3, 2017 post #6 https://www.prestashop.com/forums/topic/341056-solved-prestashop-16-extended-tinymce-editor-and-forms/ Nope, doesn't work. It isn't a TinyMCE problem, neither a JS problem. The default pass it trought with no problem. The problems lie in the HTMLPurifier on the server side, tricky as hell. When an object with an HTML type field is passed to the database, it is Purified BEFORE. The purifier is not up to date in the last PS version (1.6.1.11 for the record), so it doesn't understand the "tel" uri scheme. You need to update the HTMLPurifier located in the Tools directory. https://www.prestashop.com/forums/topic/476763-add-a-link-tel123456789-in-cms/?p=2500535 Best regards, Martin. 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