Hey all,
We're putting the CKEditor in a webbrowser control in C# win forms.
We're getting a problem any time we create a select box using the CKEditor when it is wrapped in this form control. I only get the error if I add items to the selectbox-- if I leave it blank, there is no error. We can't get it to occur when opening the exact same HTML in an actual browser. The error we are getting is:
Line: 11644
Error: 'nodeValue.length' is null or not an object
Line 11644 refers to the line 11644 after you run ckeditor.js through http://jsbeautifier.org/.
Does anybody have any idea why this is not working in the webbrowser in .NET?
Thanks in advance,
Scott
Our HTML:
<html>
<head>
<title>RMS.Base.Controls.WebDocumentEditor</title>
<script type='text/javascript' src='http://rnd.skyward.com/wcms/ckeditor.js'></script>
<script language='javascript'>
function updateHidden(){
document.getElementById('editorValue').value = CKEDITOR.instances.editor1.getData();
setTimeout('updateHidden()', 1000);
}
window.onload = function () {
CKEDITOR.replace('editor1',
{
on :
{
// Maximize the editor on start-up.
'instanceReady' : function( evt )
{
evt.editor.execCommand( 'maximize' );
}
}
}
);
setTimeout('updateHidden()', 1000);
updateToolbar();
}
function updateToolbar() {
CKEDITOR.config.toolbar_Full = [
['Source', '-', 'NewPage', 'Preview', '-', 'Templates'],
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Print', 'SpellChecker', 'Scayt'],
['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'], '/', ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote', 'CreateDiv'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak'], '/', ['Styles', 'Format', 'Font', 'FontSize'],
['TextColor', 'BGColor'],
['Maximize', 'ShowBlocks', '-', 'About']
];
}
</script>
</head>
<body>
<form method='post'>
<textarea id='editor1' name='editor1'></textarea>
<input type='textbox' id='editorValue' value='' style='visibility:hidden;' />
</form>
</body>
</html>
Thu, 07/01/2010 - 22:33
#1
Re: CKEditor in C# WebBrowser
Has anybody successfully put this in a .NET winform webbrowser control?