Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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 (scriptBaseUrl.StartsWith("~/"))
            {
                scriptBaseUrl = fckEditor.ResolveUrl(scriptBaseUrl);
            }
        }
Exemplo n.º 3
0
        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(scriptBaseUrl.StartsWith("~/"))
            {
                scriptBaseUrl = fckEditor.ResolveUrl(scriptBaseUrl);
            }
        }