Hi,
I've been grappling with the .NET fck component for a few days, and have finally got it working. I thought I'd share my work, so it's easier for other people.
First of all, you need the .NET component (FredCK.FCKeditorV2.dll), and the fck files (javascript, html files, images, the lot) in your project.
I used the following code as part of a web control:
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
Dim editor As New FCKeditor
editor.CustomConfigurationsPath = ""
editor.BaseHref = "http://localhost/WASP.NET/Libraries/"
editor.BasePath = "/WASP.NET/Libraries/"
editor.DefaultLanguage = "en"
editor.ID = "wasp_editor"
editor.EditorAreaCSS = editor.BasePath + "../css/iframe.css"
editor.SkinPath = editor.BasePath + "editor/skins/silver/"
editor.PluginsPath = editor.BasePath + "editor/dialog/"
editor.Height = New System.Web.UI.WebControls.Unit(700)
editor.Value = content
editor.RenderControl(output)
you'll need to substitute the paths for your own, and the height as well. I had a problem with IE, too, so I needed to add the following line to fckconfig.js:
FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>' ;
which fixed it. I commented out the top few lines in fckconfig.js, too (the ones above FCKConfig.AutoDetectLanguage), as they were duplicates of those above, and were causing trouble.
Hope this helps someone,
Sam
Fri, 06/03/2005 - 04:52
#1