ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - HTML Editor - Server side

Obout.Ajax.UI.HTMLEditor.EditPanel class

 Inheritance Hierarchy

<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.HTMLEditor" TagPrefix="obout" %>

Edit panel that allows to view and edit HTML content.

Public properties

Name Description
propertyActiveMode ActiveModeType. Gets or sets the active mode on load.
Default ActiveModeType.Design .
propertyAutoFocus Bool. Gets or sets a value indicating whether the Edit Panel will be focused on load.
Default true.
propertyBackColor Color. Gets or sets the background color of the control for all panels: Design, HTML text and Preview. (Inherited from WebControl.)
propertyCancelControls String. Gets or sets the semicolon separated identificators(ID) of controls that may cause a postback on which the posted content should be ignored by the EditPanel.
Default String.Empty .

In the following example the current Editor's content will not be posted to server on the Timer's Tick event. It will be posted on the Submit button click only.

<asp:UpdatePanel runat="server" UpdateMode="Conditional" >
  <ContentTemplate>
    <obout:Editor EditPanel-CancelControls="Timer1" ... />
    <asp:Button runat="server" Text="Submit" ID="Submit" />
  </ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" UpdateMode="Conditional" >
  <ContentTemplate>
    Server time: <asp:Label runat="server" ID="Label1" />
    <asp:Timer ID="Timer1" runat="server" Interval="10000" ... />
  </ContentTemplate>
</asp:UpdatePanel>
propertyCaretPositionInDesignMode Bool. Gets or sets a value indicating whether the initial caret position in Design mode will be set at the document's start.
Default true.
propertyClientID String. Gets the server control identifier generated by ASP.NET. (Inherited from Control.)
propertyContextMenu Obout.Ajax.UI.HTMLEditor.ContextMenu.ContextMenu overridable. Gets the associated Context Menu control.
propertyContextMenuID String. Gets or sets the associated Context Menu ID.
propertyContent String. Gets or sets the HTML content.
Default String.Empty .
propertyCssClass String. Gets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client. (Inherited from WebControl.)
propertyDefaultDirection DocumentDirection. Gets or sets the default direction in document.
Default DocumentDirection.Auto.
propertyDefaultFontFamily String. Gets or sets the font family used in all edit modes of the control.
By default (String.Empty) values from the appropriate CSS files are used, see the DesignPanelCssPath, DocumentCssPath and HtmlPanelCssClass properties.

Example: DefaultFontFamily="Arial"
propertyDefaultFontSize String. Gets or sets the font size used in all edit modes of the control.
By default (String.Empty) values from the appropriate CSS files are used, see the DesignPanelCssPath, DocumentCssPath and HtmlPanelCssClass properties.

Example: DefaultFontSize="8pt"
propertyDesignPanelCssPath String. Gets or sets the document's CSS file path for 'design' mode.
By default (String.Empty) an embedded file is used.

Example: "~/styles/design.css"
propertyDocumentCssPath String. Gets or sets the document's CSS file path for 'design' and 'preview' modes.
By default (String.Empty) an embedded file is used.

Example: "~/styles/document.css"
propertyFullHtml Bool. Gets or sets a value indicating whether the content will be generated as entire page HTML code with <HTML>, <HEAD> and <BODY> tags.
Default false.

See online example.
propertyHeight Unit. Gets or sets the height of the control. (Inherited from WebControl.)
propertyHistorySizeInDesignMode Int. Gets or sets the maximum length of undo/redo history in Design mode.
Default 30.
propertyHtmlPanelCssClass String. Gets or sets the CSS class for 'HTML text' mode panel.
By default when empty, "oae_htmlpanel_default" is used.
propertyID String. Gets or sets the programmatic identifier assigned to the server control. (Inherited from Control.)
propertyIgnoreTab Bool. Gets or sets a value indicating whether to ignore the default 'Tab' key navigation for all panels (tabIndex = -1).
Default false.
propertyImmediateValidation Bool. Gets or sets a value indicating whether the ASP.NET validation will be run immediately on content set or Design panel blur.
Default true.
propertyIndentInDesignMode Int. Gets or sets the width of Indent (pixeles) in Design mode.
Default 40.
propertyInitialCleanUp Bool. Gets or sets a value indicating whether the inital cleanup (MS Word tags) of the content will be done on the control load.
Default false.
propertyLinkedToolbars String. Gets or sets the ID's of linked toolbars separated with ';' characters.

See online example.
propertyNoDrop Bool. Gets or sets a value indicating whether any dropping in Design mode is prohibited.
Default false.
propertyNoPaste Bool. Gets or sets a value indicating whether any pasting (except Plain Text) in Design mode is prohibited.
Default false.
propertyNoScript Bool. Gets or sets a value indicating whether JavaScript code will be suppressed in EditPanel's content.
Default false.
propertyNoUnicode Bool. Gets or sets a value indicating whether Unicode characters (hex codes from '0080' to 'FFFF') will be replaced with &#code; in EditPanel's content.
Default false.
propertyOldTags Bool. Gets or sets a value indicating whether to generate old-fashioned tags (bold, em, etc.).
Default false.
propertyOnClientActiveModeChanged String. Gets or sets the name of client-side function(handler) executed after edit mode is changed.
This handler is added to the client-side event activeModeChanged, see Client-Side.
propertyOnClientBeforeActiveModeChanged String. Gets or sets the name of client-side function(handler) executed before edit mode is changed.
This handler is added to the client-side event beforeActiveModeChanged, see Client-Side.
propertyOnClientGetContent String. Gets or sets the name of client-side function(handler) executed when EditPanel is focused.
This handler is added to the client-side event focused, see Client-Side.

See online example.
propertyOnClientGetContent String. Gets or sets the name of client-side function(handler) executed when EditPanel's content is obtained.
This handler is added to the client-side event getClient, see Client-Side.
propertyOnClientLoaded String. Gets or sets the name of client-side function(handler) executed after the control's loading is complete.
This handler is added to the client-side event loaded, see Client-Side.
propertyPlainText String. Gets the plain text of the content.
propertyPopupHolderID String. Gets or sets the associated Popup Holder ID.
propertyResizeByDraggingEnabled Bool. Gets or sets a value indicating whether the resize-by-dragging tool is enabled in Design mode for <IMG>, <DIV> etc. elements. IE and FireFox have this tool only.
Default true.
propertySuppressTabInDesignMode Bool. Gets or sets a value indicating whether to ignore 'Tab' key in Design mode.
Default false.

Protected properties

Name Description
propertyPopupHolder Obout.Ajax.UI.HTMLEditor.PopupHolder overridable. Gets or sets the associated Popup Holder control.

Events

Name Description
propertyCommand CommandEventHandler. Occurs when one of CommandButton buttons in the toolbar was clicked, or when the EditPanel's client-side partialUpdate() method was called directly.

Event's argument has type CommandEventArgs.

Example

ASPX:

<obout:Editor runat="server" Id="editor" ... >
  <EditPanel OnCommand="onCommand"  ... />
  ...
</
obout:Editor>

Code behind:

protected void onCommand(object sender, CommandEventArgs e)
{
   EditPanel editPanel = sender as EditPanel;
   // set empty content on 'Cancel' button click
   // (by default the previous content is restored)
   if (e.CommandName == "cancel")
   {
       editPanel.Content = "";
   }
}
propertyContentChanged ContentChangedEventHandler. Occurs on post back when content has been changed.

Event's argument has type EventArgs.

See online example.

"Thanks for your quick response. I have really enjoyed developing with your product. So far it seems easy to use and it really adds style to my projects. "

Troy Patton

Random testimonial   All testimonials