AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

BWAEditor Methods

The BWAEditor type exposes the following members.

Methods


  Name Description
Public method AddCustomButton
Registers a custom toolbar button that calls a client-side function.
Public method AddSnippet
Adds a snippet from code-behind.
Public method AddStyleFormat
Adds a CSS class option from code-behind.
Protected method CreateChildControls
Creates the child-control tree. This editor renders its textarea manually in RenderContents(HtmlTextWriter) so TinyMCE receives the exact markup it expects; no child controls are added here.
Public method Static member GetDialogBridgeScriptUrl
Gets the URL of the BWAEditorDialogBridge.js embedded resource. Dialog pages include this script to work with the BWAEditor when opened with ?mode=bwa.
Public method LoadFromEditorSettings
Loads snippets, CSS classes, and style formats from ACSP EditorSettings. Call after EditorSettings is assigned if setting up manually.
Public method LoadPostData
Implements LoadPostData(System.String,System.Collections.Specialized.NameValueCollection). Captures the posted textarea value back into _content when it differs from the current content.
Protected method OnInit
Raises the Init event. Ensures the Advantage hosting context is present (throwing otherwise) and wires up ACSP editor settings.
Protected method OnLoad
Raises the Load event. Registers the control to participate in post-back data processing (every load, not just post-backs, so ASP.NET routes post data to LoadPostData(String, NameValueCollection)) and loads ACSP editor settings on first load.
Protected method OnPreRender
Raises the PreRender event. Registers the TinyMCE and BWAEditor bridge scripts at the top of the page (once per request) with the current CSP nonce so the editor bootstraps before the body's init scripts run.
Public method RaisePostDataChangedEvent
Implements RaisePostDataChangedEvent. Currently a no-op; override in a subclass or attach an event to raise a ContentChanged callback.
Public method RenderBeginTag
Writes the editor's opening markup (wrapper <div>, optional <fieldset>, and legend) to the response stream.
Protected method RenderContents
Writes the editor's body — the hosted <textarea> and the inline TinyMCE init script — to the response stream.
Public method RenderEndTag
Writes the editor's closing markup (close fieldset and wrapper <div>) to the response stream.