ToolbarFontSizeEdit Class
A default toolbar editor that allows the font size to be selected and applied to the text content selected within the design view area.
Namespace: DevExpress.Web.ASPxHtmlEditor
Assembly: DevExpress.Web.ASPxHtmlEditor.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Remarks
The ASPxHtmlEditor allows end-users to change the font size of the editor’s selected text by using the Font Size combo box (ToolbarFontSizeEdit). Clicking the combo box button, opens a drop down window with predefined font sizes.
You can add the Font Size button to toolbars by using either the ASPxHtmlEditor designer at design time, or programmatically.
protected void Page_Load(object sender, EventArgs e) {
HtmlEditorToolbar stToolbar1 = HtmlEditorToolbar.CreateStandardToolbar2();
ToolbarFontSizeEdit fsButton = new ToolbarFontSizeEdit();
ToolbarListEditItem item1 = new ToolbarListEditItem();
item1.Text = "1 (8pt)";
item1.Value = "1";
ToolbarListEditItem item2 = new ToolbarListEditItem();
item2.Text = "2 (10pt)";
item2.Value = "2";
ToolbarListEditItem item3 = new ToolbarListEditItem();
item3.Text = "3 (12pt)";
item3.Value = "3";
ToolbarListEditItem item4 = new ToolbarListEditItem();
item4.Text = "4 (14pt)";
item4.Value = "4";
ToolbarListEditItem item5 = new ToolbarListEditItem();
item5.Text = "5 (18pt)";
item5.Value = "5";
ToolbarListEditItem item6 = new ToolbarListEditItem();
item6.Text = "6 (24pt)";
item6.Value = "6";
ToolbarListEditItem item7 = new ToolbarListEditItem();
item7.Text = "7 (36pt)";
item7.Value = "7";
fsButton.Items.Add(item1);
fsButton.Items.Add(item2);
fsButton.Items.Add(item3);
fsButton.Items.Add(item4);
fsButton.Items.Add(item5);
fsButton.Items.Add(item6);
fsButton.Items.Add(item7);
stToolbar1.Items.Add(fsButton);
ASPxHtmlEditor1.Toolbars.Add(stToolbar1);
}
Inheritance
See Also