private void InitializeEditor() { if (fckEditor == null) { fckEditor = new FCKeditor(); } if (ConfigurationManager.AppSettings["FCKeditor:CustomConfigPath"] != null) { fckEditor.CustomConfigurationsPath = fckEditor.ResolveUrl(ConfigurationManager.AppSettings["FCKeditor:CustomConfigPath"]); } fckEditor.HtmlEncodeOutput = false; if (ConfigurationManager.AppSettings["FCKeditor:BasePath"] != null) { scriptBaseUrl = ConfigurationManager.AppSettings["FCKeditor:BasePath"]; } if (ConfigurationManager.AppSettings["FCKeditor:StylesXmlPath"] != null) { stylesXmlPath = fckEditor.ResolveUrl(ConfigurationManager.AppSettings["FCKeditor:StylesXmlPath"]); if (stylesXmlPath.EndsWith(".ashx")) { stylesXmlPath += "?cb=" + Guid.NewGuid().ToString(); } //prevent cache } else { stylesXmlPath = scriptBaseUrl + "fckstyles.xml"; } //if(ConfigurationManager.AppSettings["FileBrowserRelativePath"] != null) // appRelativeFileBrowserPath = ConfigurationManager.AppSettings["FileBrowserRelativePath"]; //if (ConfigurationManager.AppSettings["ImageBrowserRelativePath"] != null) // appRelativeImageBrowserPath = ConfigurationManager.AppSettings["ImageBrowserRelativePath"]; //if(ConfigurationManager.AppSettings["FileBrowserServiceRelativePath"] != null) // appRelativeFileBrowserServicePath = ConfigurationManager.AppSettings["FileBrowserServiceRelativePath"]; //if (ConfigurationManager.AppSettings["ImageBrowserServiceRelativePath"] != null) // appRelativeImageBrowserServicePath = ConfigurationManager.AppSettings["ImageBrowserServiceRelativePath"]; //if (ConfigurationManager.AppSettings["LinkBrowserServiceRelativePath"] != null) // appRelativeLinkBrowserServicePath = ConfigurationManager.AppSettings["LinkBrowserServiceRelativePath"]; //useConnector = GetBoolPropertyFromConfig("FileBrowserUseService", true); if (scriptBaseUrl.StartsWith("~/")) { scriptBaseUrl = fckEditor.ResolveUrl(scriptBaseUrl); } }
public override string GetDesignTimeHtml() { FCKeditor control = (FCKeditor)Component; return(String.Format(CultureInfo.InvariantCulture, "<div><table width=\"{0}\" height=\"{1}\" bgcolor=\"#f5f5f5\" bordercolor=\"#c7c7c7\" cellpadding=\"0\" cellspacing=\"0\" border=\"1\"><tr><td valign=\"middle\" align=\"center\">FCKeditor V2 - <b>{2}</b></td></tr></table></div>", control.Width, control.Height, control.ID)); }