You are not logged in.
I'm not that strong in javascript, so I can't figure out how to force Superclean to run with all options ON when the user tries to submit. I don't want it to ask for anything, in fact I don't want the user to notice it. How do i do this?
Offline
you could do it server-side - that would be the easiest solution.
another solutions would be to execute this code onSubmit:
editor._wordClean();
var D = editor.getInnerHTML();
D = D.replace(/face="[^"]*"/gi, '');
// { (stops jedit's fold breaking)
D = D.replace(/font-family:[^;}"']+;?/gi, '');
D = D.replace(/size="[^"]*"/gi, '');
// { (stops jedit's fold breaking)
D = D.replace(/font-size:[^;}"']+;?/gi, '');
D = D.replace(/color="[^"]*"/gi, '');
// { (stops jedit's fold breaking)
D = D.replace(/([^-])color:[^;}"']+;?/gi, '$1');
D = D.replace(/(style|class)="\s*"/gi, '');
D = D.replace(/<(font|span)\s*>/gi, '');
editor.setHTML(D);
HTMLArea._postback(editor.config.tidy_handler, {'content' : editor.getInnerHTML()},
function(javascriptResponse) { eval(javascriptResponse) });
(copied from SuperClean plugin)
Niko
Offline