Great news! There's an official .Net control at work, and I'm part of it. And it is now working very well, so, download it here: http://ckeditor.com/download.
I have spent some time now to created a server control for ASP.NET, in the same manner as the FCKeditor2 control.
I'm keeping always the last 3 versions attached to this post, as this is the maximum for the form. And no I do not have the time to keep a blog or a 'project' in 'github' or its equivalents.
Click here to download the latest version
Basics how to use:
- Put the FredCK.CKEditor.dll in your /Bin folder (You can find it in bin/Release in the Zip package)
- Register the control with either or even both methods:
- Globally, in web.config: <add tagPrefix="FredCK" namespace="FredCK.CKEditor" assembly="FredCK.CKEditor, Culture=neutral, PublicKeyToken=9ef91de3e191403a" />
- Per page: <%@ Register Assembly="FredCK.CKEditor" Namespace="FredCK.CKEditor" TagPrefix="FredCK" %>
Old note: Although I have implemented a fix for the HtmlEncodeOutput in some previous release (which did not modify ckeditor's sources), now a few days after - they release CKEditor 3.1, and guess what, it finally has htmlEncodeOutput...
So I commented out my code, and implemented the configuration option htmlEncodeOutput.
Attention: If you have specified the EncodeOutput property yourself, now you have to change it to HtmlEncodeOutput, since I change it to fit the new configuration name.
Some of the configurations can be set only in actual code and not inline attributes, due to them being arrays. I may find a solution, maybe implementing a converter for the inline attributes.
The only thing I do not entirely understand is the toolbarLocation thing. Are there any values other than 'top' and 'bottom' and will anyone ever use them?
People have been asking about the password for the strongKey file, so here it is: ckeditor. Pretty hard to guess huh?
Note: each time before I remove the old attachments and upload the new one, as there's a limit for max 3 attachments. Thank you all for your comments! You helped make this control better!
BTW, CKEditor team: You CAN take this and make it an official download
UPDATE: A critical update. Since 3.5.1 there was a problem when destroying the CKE (e.g. page unload, submit...) - and only when NOT using MsAjax. I found out that in the beginning of this control, the 'destroy' function was private, and so I used fire('destroy') to completely destroy it. And now CKE has trouble destroying it this was, so it needed two calls... I changed it to destroy using .destroy() which the MsAjax support already used. Yes we were so concentrated on fixing bugs related to MsAjax that we forgot to test in 'normal' environments...
UPDATE: A little fix for Dialog_BackgroundCoverOpacity, when formatting the decimal point, to always use a period.
UPDATE: Fixed a bug with SharedSpacesTop, which was working improperly under a MasterPage, or any container control.
UPDATE: CKE 3.5 is out. I have added the new configurations. Tested and everything is working fine!
UPDATE: CKE 3.4.1 is out. I have added the new configuration filebrowserWindowFeatures. And a property Text which is a synonym for the Value property.
UPDATE: I have added the "CKEditor" keyword to the title of this post, so google will find it also in response to "ckeditor" search and not only "cke"
Gotta take care of those pure guys looking for "ckeditor asp.net" and finding nothing...
UPDATE: I have tested against CKE 3.4, and added the new configurations of 3.3.2 and 3.4: smiley_columns, enableTabKeyTools, autoGrow_maxHeight, autoGrow_minHeight. I have also created a convenience property/configuration for the new plugin tableresize, this property is named "RegisterPlugin_TableResize", and if set to true (even inline), it will automatically add the 'tableresize' to the array of ExtraPlugins.
UPDATE: I have tested with CKE 3.3.1 and all seems fine! There was a bug that I have fixed in this version (was present in 3.3 also), where the following configurations were not quoted in the JS, and this broke the page's code: resizeDir, contentsLangDirection, scayt_moreSuggestions, toolbarLocation. This may also explain why ToolbarLocation did not work for some people.
UPDATE: I have updated the configurations for supporting the 3.3 changes. For some reason the config documentation was very poorly updated, some stuff like scayt-spell-checker was written down as "3.0" when it was added in 3.3, so I had to hunt down all the changes.
There's also another important change: Now ContentsLangDirection is defaulted to the new (undocumented...) value 'ui', which means it will inherit from the language of the UI.
BasePath will now default to "~/ckeditor/", so you don't need to specify that everywhere.
BTW, you can put a key-pair in your app.config, name "CKEditor:BasePath", with a value for all instances for CKE... This will save you some code.
UPDATE: I have just updated the configurations to reflect the new 3.2 version. (Exactly one new configuration...)
UPDATE: More bug fixes with AJAX. I have just found out that destroy() is the correct method to cleanup the CKEditor. To prevent 'hiding editor' before postback I did a 'hack' to cleanup without actually remove the editor from document.
UPDATE: And another bugfix with MsAjax. This time with postbacks which don't trigger onsubmit. Actually this was quite an easy fix.
UPDATE: Fixed another problem with Microsoft Ajax. Needed cleanup of CKEditor when there's a PostBack, because it generates an error that the instance alredy exists. Note: The cleanup is still not full. Need to find a better API function to cleanup an instance.
UPDATE: Due to some people trying to put this inside UpdatePanels and that's not working, I have added support for Microsoft AJAX, which does some workarounds for such cases. The main problem is that registering scripts with Microsoft AJAX requires that the ckeditor.js will cal back the AJAX library to tell it that it is done loading. And that of course isn't gonna happen. So according to my tests my workaround works now. Try it yourself...
UPDATE: I have added the configurations for integration with File Browsers and Uploader scripts. Still not received ANY feedback from anyone.
UPDATE: I worked on most of the configurations now and added the new ones of 3.0.2 and 3.1, and finished the work on the old ones. There are only a few left now to work on. This is the last update for today...
UPDATE: So shared spaces is supported now... And you can set them through SharedSpacesTop/SharedSpacesTopClientID/SharedSpacesBottom/SharedSpacesBottomClientID. There is also a CKSharedSpace control now, which is basically a DIV web control, so you can use that for a shared space, or anything else you want. In addition now the ExtraPlugins and RemovePlugins is fully supported.
UPDATE: CKEditor 3.1 is out, with integrated natural HtmlEncodeOutput capability. Hurray!
UPDATE: I have fixed the HTML Encode thing so ASP.NET does not give a security error anymore. The ASP.NET control is usable now!
I have reversed the order of update notifications, so If you're looking for info on the last update, look on the *beginning* of the page