Skip to main content
Version: 4.2

RichTextBoxCommand

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Specifies an editing command applied to the current selection of a RichTextBox.

public enum RichTextBoxCommand

Pass the value to ExecuteCommand. The commands that take an argument are ForeColor and BackColor (a CSS color), CreateLink (an address), InsertHtml (an HTML fragment), InsertText (plain text), FormatBlock (p, h1, h2, h3, blockquote or pre), FontName (a font family), FontSize (a size in points) and InsertTable (rows and columns, as "3x4", up to 100 rows and 30 columns). An unsafe address, a font name with quotes or semicolons and a size that is not a number are ignored.

Fields​

NameDescriptionValue
AlignCenterCenters the paragraph.
AlignLeftAligns the paragraph to the left.
AlignRightAligns the paragraph to the right.
BackColorSets the highlight color; the argument is a CSS color.
BoldToggles bold.
BulletedListToggles a bulleted list.
CreateLinkTurns the selection into a hyperlink; the argument is the address.
FontNameSets the font of the selection; the argument is a font family, such as Arial.
FontSizeSets the font size of the selection; the argument is the size in points, such as 14 or 10.5.
ForeColorSets the text color; the argument is a CSS color.
FormatBlockChanges the block format; the argument is p, h1, h2, h3, blockquote or pre.
IndentIncreases the indent.
InsertHtmlReplaces the selection with an HTML fragment; the fragment is sanitized first.
InsertTableInserts an empty table at the caret; the argument is the number of rows and columns, as "3x4".
InsertTextReplaces the selection with plain text.
ItalicToggles italic.
JustifyJustifies the paragraph.
NumberedListToggles a numbered list.
OutdentDecreases the indent.
RedoRedoes the last undone edit.
RemoveFormatRemoves character formatting from the selection.
SelectAllSelects the whole content.
StrikethroughToggles strikethrough.
SubscriptToggles subscript.
SuperscriptToggles superscript.
UnderlineToggles underline.
UndoUndoes the last edit.
UnlinkRemoves the hyperlink from the selection.

Used By​

NameDescription
RichTextBox.ExecuteCommandApplies an editing command to the current selection in the browser, as the toolbar does.