Hi there,
I'm using radEditor and found annoying error that must be solved.
What happened was the user wanted to paste HTML content from google finance to radEditor.
And it triggered javascript error, object not found in Internet Explorer 8.
For more details, I enclosed the google finance content at the end of this page.
After tiring and restless debugging, much testing, I still couldn't suppress the javascript error.
I use the onerror syntax to capture all javascript error, but it doesn't work.
Finally, I found the culprit. The image tag has javascript onload event. Thus I use the following crude code to replace the onload event.
This works for future use, but it sill doesn't solve the issue when the user pasted the content.
}
In fact, I tried to paste the google finance content, I received the same javsacript error in this page.
I tried to use OnClientCommandExecuting radEditor client event, hoping I can modiy the clipboard content before it's being paste into radEditor. But the args.get_value() returns empty.
My questions,
1. How to suppress all javascript error in radEditor?
2. How to modify the clipboard content before it's being paste to radEditor. OnClientPasteHtml is too late.
Thank you.
http://www.google.com/finance
I'm using radEditor and found annoying error that must be solved.
What happened was the user wanted to paste HTML content from google finance to radEditor.
And it triggered javascript error, object not found in Internet Explorer 8.
For more details, I enclosed the google finance content at the end of this page.
After tiring and restless debugging, much testing, I still couldn't suppress the javascript error.
I use the onerror syntax to capture all javascript error, but it doesn't work.
window.onerror =
function
() {
alert(
"Error captured"
);
}
Finally, I found the culprit. The image tag has javascript onload event. Thus I use the following crude code to replace the onload event.
This works for future use, but it sill doesn't solve the issue when the user pasted the content.
function
OnClientPasteHtml(sender, args) {
alert(
"OnPaste"
);
var
value = args.get_value();
alert(value);
value = value.replace(/ on/g,
" _on"
);
args.set_value(value);
In fact, I tried to paste the google finance content, I received the same javsacript error in this page.
I tried to use OnClientCommandExecuting radEditor client event, hoping I can modiy the clipboard content before it's being paste into radEditor. But the args.get_value() returns empty.
My questions,
1. How to suppress all javascript error in radEditor?
2. How to modify the clipboard content before it's being paste to radEditor. OnClientPasteHtml is too late.
Thank you.
http://www.google.com/finance
Huffington Deal Raises Question: What Site Will Be Sold Next?
By EVELYN M. RUSLI In agreeing to buy The Huffington Post for $315 million, AOL is putting what appears to be a significant premium on the ability to attract and build a community of readers.