I am trying to remove extra code added when generating pages when using the visual editor in TS 6.5, I am doing it with Formapi.I am getting the value of the text field, parsing it and replacing unwanted code, my problem right now is getting that value saved back to the dcr data file. this is the code i am using:NOTE: with this code i am removing: but eventualy i need to remove from the field all these: <META content="MSHTML 6.00.6000.16890" name="GENERATOR"><LINK title="/iw/ewebeditpro20/ektnormal.css" href="/iw/ewebeditpro20/ektnormal.css" rel="stylesheet">function removeExtraCode () {//gets the value of the text fieldvar whole_body = String(IWDatacapture.getItem("/Page Content").getValue());var strEscaped = escape(whole_body); //added to escape all caracters//replace unwanted codevar newstrchanged = strEscaped.replace(/%26%2365279%3B%20/gi," ");//unescape characters and save replace string to strfinalvar strfinal = unescape(newstrchanged);}IWEventRegistry.addFormHandler("Onsave" , removeExtraCode); </script>
var whole_body = String(IWDatacapture.getItem("/Page Content").getValue());
I need to save the new value of the text field to the xml document, I dont see how that piece of code can save the value back before generating the page, I am stuck there.
Thanks I got it working