Back to Devexpress

ToolbarInsertImageDialogButton Class

aspnet-devexpress-dot-web-dot-aspxhtmleditor-c66c3914.md

latest4.6 KB
Original Source

ToolbarInsertImageDialogButton Class

A default toolbar button that invokes an image dialog allowing an image to be inserted into the design view area.

Namespace : DevExpress.Web.ASPxHtmlEditor

Assembly : DevExpress.Web.ASPxHtmlEditor.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class ToolbarInsertImageDialogButton :
    HtmlEditorToolbarItem
vb
Public Class ToolbarInsertImageDialogButton
    Inherits HtmlEditorToolbarItem

Remarks

ASPxHtmlEditor supports working with images within the design view area, by using the specific image dialogs that can be invoked by clicking the Insert Image button (of the ToolbarInsertImageDialogButton type).

You can add the Insert Image button to toolbars by using either the ASPxHtmlEditor designer at design time, or programmatically.

csharp
protected void Page_Load(object sender, EventArgs e) {
    HtmlEditorToolbar stToolbar1 = HtmlEditorToolbar.CreateStandardToolbar1();
    ToolbarInsertImageDialogButton imgButton = new ToolbarInsertImageDialogButton();
    stToolbar1.Items.Add(imgButton);
    ASPxHtmlEditor1.Toolbars.Add(stToolbar1);
}
aspx
<dx:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server">
    <Toolbars>
        <dx:HtmlEditorToolbar Name="StandardToolbar1">
            <Items>
                <dx:ToolbarInsertImageDialogButton>
                </dx:ToolbarInsertImageDialogButton>
            </Items>
        </dx:HtmlEditorToolbar>
    </Toolbars>
</dx:ASPxHtmlEditor>

The image upload settings are defined by the following properties:

PropertyDescription
UploadFolderSpecifies the location of a folder where images uploaded by the ASPxHtmlEditor control should be stored.
ASPxHtmlEditorImageUploadSettings.ValidationSettingsUse this property to access and customize the settings that relate to the validation of image files uploaded using the ASPxHtmlEditor control.
ASPxHtmlEditorSettings.AllowInsertDirectImageUrlsThis property specifies whether direct links to the specified images located on other web sites may be inserted into the editor’s HTML markup.

Implements

IStateManager

IPropertiesOwner

IExpressionsAccessor

Inheritance

Object StateManager CollectionItem ToolbarItemBase HtmlEditorToolbarItem ToolbarInsertImageDialogButton

See Also

ToolbarInsertImageDialogButton Members

HTML Editor

Default Toolbar Items

Menu Toolbar Items

Html Editor Designer

DevExpress.Web.ASPxHtmlEditor Namespace