Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
560
How to detect HTML has changed
posted

I have a WebHtmlControl on a page and some existing code to check if the text of the control has changed. This is done by simply storing the original value when the form loads and comparing it to the current value using the KeyDown and AfterAction client side events.

I have recently enabled the HTML Editor feature and included more toolbar options and now have an issue where changing the styling, ie: highlighting text and changing the text colour, is not detected. This is because the text hasn't changed, just the markup.

I have implemented a similar piece of code that stores the value in document.getElementById("txtEmailHTMLBody_tw").innerHTML when loaded and compares this using the same actions defined above.

The problem i have is that the comparison does not evaluate as expected as it appears the styling/markup has not yet changed, ie: the AfterAction fires before modifying the innerHTML property.

Is there another way of doing this? It has to be client side and i'm using version 11.1.20111.2135.

Thanks in advance.

Parents Reply Children
No Data