/// <summary> /// Returns an instance of Toolbar object /// </summary> /// <param name="name">Name of the toolbar</param> /// <returns>Toolbar object populated with toolbar itemsitems</returns> public static Toolbar GetToolbar(Editor editor, string name) { Toolbar tb = new Toolbar(name); tb._editor = editor; tb.LoadData(); return tb; }
public static SpawFMConfiguration GetFileManagerConfiguration(Editor editor) { return (new SpawFMConfiguration(editor)); }
public SpawFMConfiguration(Editor editor) { this._editor = editor; }
protected override void OnPreRender(EventArgs e) { if (!base.DesignMode) { if (!String.IsNullOrEmpty(this.ToolbarFromID)) { if (this.Parent.FindControl(this.ToolbarFromID) != null) this._toolbar_from = (Editor)this.Parent.FindControl(this.ToolbarFromID); } this.ApplyDefaults(); if (Agent.GetAgent() != Agents.Unsupported) this.RegisterClientScripts(); } base.OnPreRender(e); }
public static Editor GetEditor(string name, string text, string lang, string toolbarset, string theme, string width, string height, string stylesheet, string page_caption) { Editor spaw = new Editor(); /* spaw.ID = name; // add first page spaw.Pages.Add(new EditorPage(name, page_caption, text)); // language if (!String.IsNullOrEmpty(lang)) spaw._language = Language.GetLanguage(lang); else spaw._language = Language.GetLanguage(spaw.Configuration["default_lang"].Value); // theme if (!String.IsNullOrEmpty(theme)) spaw._theme = Theme.GetTheme(theme); else spaw._theme = Theme.GetTheme(spaw.Configuration["default_theme"].Value); // toolbarset if (!String.IsNullOrEmpty(toolbarset) && spaw.Configuration["toolbarset_" + toolbarset] != null) { spaw._toolbars = new Dictionary<string, Toolbar>(); foreach (XmlNode tbnode in spaw.Configuration["toolbarset_" + toolbarset].XmlNode.SelectNodes("toolbar")) spaw._toolbars.Add(tbnode.Attributes["name"].Value, Toolbar.GetToolbar(spaw, tbnode.Attributes["name"].Value)); } // values if (!String.IsNullOrEmpty(width)) spaw._width = width; if (!String.IsNullOrEmpty(height)) spaw._height = height; if (!String.IsNullOrEmpty(stylesheet)) spaw.Stylesheet = stylesheet; */ return spaw; }