Published on Tuesday, May 11, 2010 by Jason in .NET | in CKEditor | in JavaScript
Maybe I'm missing something, but I'm not sure what the fuss is about using CKEditor 3.x in an ASP.NET application. You don't need any of the wrapper controls out there unless they provide specific functionality that CKEditor does not provide.
Here is all you really need to do to incorporate CKEditor 3.x into your ASP.NET application.
1. Read and follow the instructions on how to install the files for using CKEditor in the CKEditor 3.x - Developer's Guide.
2. Add this in the HEAD section of your HTML.
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
3. Add this to your FORM. Be sure to name the textbox control and the reference to that control in the Javascript as needed.
<asp:TextBox ID="editor1" runat="server" TextMode="MultiLine"
Rows="10" Columns="50"></asp:TextBox>
<script type="text/javascript">
//<![CDATA[
CKEDITOR.replace('<%=editor1.ClientID %>');
//]]>
</script>
4. Read the Developers Guide on how to incorporate any customization.
5. To populate/save information from/to a database, reference the textbox by the name you gave it in #3 above in this way.
editor1.text
6. To have multiple editors on one page, repeat the steps above making sure to rename the control and Javascript reference.
That's it, pretty simple!
Published on Monday, September 14, 2009 by Jason in Internet Explorer | in JavaScript | in Greybox
Greybox is nice to use having the modal window and all. I have found one problem so far when using IE8. It works good except when closing the Greybox. In IE8 (Browser Mode: IE8; Document Mode: IE8 Standards), the greybox does not close properly. It shrinks to a 100x100 square and positions itself in the upper left corner (0,0) of the browser window.
I have found by adding this meta tag directly on the page it now closes, though a little rough. Meaning, you still see the square get positioned, but it then closes fully a split second later.
<meta http-equiv="X-UA-Compatible" content="IE=7" />