Programmers Direct Posted August 22, 2014 Share Posted August 22, 2014 I am working with a fancybox and the tinymce editor makes css with double quotes and semicolons, which makes it not popup because of how the css is implemented. How can I fix this as without the css and only html it works. example css: style"text-align:center;" <--- this is how tinymce makes the html css HTML without css works. Link to comment Share on other sites More sharing options...
vekia Posted August 22, 2014 Share Posted August 22, 2014 can you show what kind of code you're trying to use? 1 Link to comment Share on other sites More sharing options...
Programmers Direct Posted August 22, 2014 Author Share Posted August 22, 2014 I am trying to get it to work with prestashop tools fancymsgbox or fancychoosebox as I want to utilize the prestashop tools if this helps. Link to comment Share on other sites More sharing options...
Programmers Direct Posted August 22, 2014 Author Share Posted August 22, 2014 (edited) prestashop's fancy msg and choose box both throw unterminated string error when using multiline string, so I removed the multi-line string replacing carriage return and such to fix this. Now it just will not popup if there is css in the function message or question part. so a simple <h2 style="text-align: center;"> does not work, but the without css works and I need it to work with tinymce use of css. I hope this makes sense. the functions can be found in the tools.js file for reference as I do not want to alter these as I want it compatible with all prestashop without any overrides I have tried replacing the double quotes with \" , replaced " with ' and even tried removing the semicolon and still will not popup if there is css in the variable passed Update Okay it seems even in direct coding the double quotes are causing issues but the css can be used if using single quotes how can I get this changed as every time I try to replace the " with ' it still does not work. Update <------Solution When using fancyboxes and tinymce one must search and replace all double quotes and escape them adding a \ before each one then removing carriage return and multiline data as it throws a unterminated string byte error. below is the smarty changes that permits the integration before inserting it in as a message. {$popup->message|replace:'"':'\"'|regex_replace:'/[\r\t\n]/':''} this replaces all " with \" then removes any multi-lines in the string. Edited August 22, 2014 by ShopSaveNEarn (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