AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

BWAEditor Members

The BWAEditor type exposes the following members.

Constructors


  Name Description
Public method BWAEditor
Initializes a new instance of the BWAEditor class.

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.

Properties


  Name Description
Public property AutoResizeHeight
When true, the editor height grows automatically with content.
Public property Content
Gets or sets the HTML content of the editor from code-behind.
Public property CurrentDomain
Gets the domain currently scoped to this control.
Public property CurrentLanguage
Gets the language currently scoped to this control.
Public property CurrentSql
Gets the SQL helper scoped to the current request.
Public property CurrentUser
Gets the authenticated user executing the current request.
Public property CustomButtons
Custom toolbar buttons registered via code-behind.
Public property DocumentManagerSearchPatterns
Search patterns for the document manager dialog.
Public property EditorHeight
Gets or sets the editor height (CSS value, e.g. "400px" or "50vh").
Public property EditorSettings
ACSP editor settings loaded from the configuration engine.
Public property EditorWidth
Gets or sets the editor width (CSS value). Empty = 100%.
Public property FileExplorerSettings
File explorer settings from ACSP configuration.
Public property ImageEditorSettings
Image editor settings from ACSP configuration.
Public property LicenseKey
TinyMCE license key. Set to "gpl" for open-source usage.
Public property Menubar
TinyMCE menubar configuration. Set to false string to hide.
Public property Plugins
Comma-separated TinyMCE plugins to load.
Public property ReadOnly
Makes the editor read-only.
Public property Snippets
HTML snippets available in the Insert menu.
Public property StyleFormats
Custom style formats (CSS classes) available in the Formats dropdown.
Public property StyleSheets
Domain stylesheets to load into the editor content area.
Public property Text
Gets or sets the plain-text representation of the editor content. Setting this property assigns the value as HTML content directly. Getting strips HTML tags.
Public property TinyMceScriptUrl
URL to the TinyMCE script. Defaults to self-hosted path. Set this to your CDN or local path. When UseCdn is true, this is ignored and jsDelivr is used.
Public property Title
Title displayed as the fieldset legend.
Public property Toolbar
TinyMCE toolbar configuration string. Pipe-separated groups. Set to empty string to use the ACSP EditorSettings toolbar translation.
Public property UseCdn
When true, loads TinyMCE from jsDelivr CDN instead of a local path. Useful for quick testing. For production, self-host TinyMCE and set this to false.
Public property UseFieldSet
Wraps the editor in a fieldset element.