Interface IHtmlTextAreaElement
- Namespace
- AngleSharp.Html.Dom
- Assembly
- AngleSharp.dll
Represents the textarea HTML element.
[DomName("HTMLTextAreaElement")]
public interface IHtmlTextAreaElement : IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IGlobalEventHandlers, IValidation
- Inherited Members
- Extension Methods
Properties
Autofocus
Gets or sets the autofocus HTML attribute, which indicates whether the control should have input focus when the page loads.
[DomName("autofocus")]
bool Autofocus { get; set; }
Property Value
Columns
Gets or sets the cols HTML attribute, indicating the visible width of the text area.
[DomName("cols")]
int Columns { get; set; }
Property Value
DefaultValue
Gets or sets the default value.
[DomName("defaultValue")]
string DefaultValue { get; set; }
Property Value
DirectionName
Gets or sets the directionality of the form element.
[DomName("dirName")]
string? DirectionName { get; set; }
Property Value
Form
Gets the associated HTML form element.
[DomName("form")]
IHtmlFormElement? Form { get; }
Property Value
IsDisabled
Gets or sets if the textarea is enabled or disabled.
[DomName("disabled")]
bool IsDisabled { get; set; }
Property Value
IsReadOnly
Gets or sets if the field is read-only.
[DomName("readOnly")]
bool IsReadOnly { get; set; }
Property Value
IsRequired
Gets or sets if the field is required.
[DomName("required")]
bool IsRequired { get; set; }
Property Value
Labels
Gets the list of assigned labels.
[DomName("labels")]
INodeList Labels { get; }
Property Value
MaxLength
Gets or sets the maxlength HTML attribute, indicating the maximum number of characters the user can enter. This constraint is evaluated only when the value changes.
[DomName("maxLength")]
int MaxLength { get; set; }
Property Value
Name
Gets or sets the name of the element.
[DomName("name")]
string? Name { get; set; }
Property Value
Placeholder
Gets or sets the placeholder HTML attribute, containing a hint to the user about what to enter in the control.
[DomName("placeholder")]
string? Placeholder { get; set; }
Property Value
Rows
Gets or sets the rows HTML attribute, indicating the number of visible text lines for the control.
[DomName("rows")]
int Rows { get; set; }
Property Value
SelectionDirection
Gets the direction in which selection occurred. This is "forward" if selection was performed in the start-to-end direction of the current locale, or "backward" for the opposite direction.
[DomName("selectionDirection")]
string? SelectionDirection { get; }
Property Value
SelectionEnd
Gets or sets the index of the end of selected text. If no text is selected, contains the index of the character that follows the input cursor. On being set, the control behaves as if setSelectionRange() had been called with this as the second argument, and selectionStart as the first argument.
[DomName("selectionEnd")]
int SelectionEnd { get; set; }
Property Value
SelectionStart
Gets or sets the index of the beginning of selected text. If no text is selected, contains the index of the character that follows the input cursor. On being set, the control behaves as if setSelectionRange() had been called with this as the first argument, and selectionEnd as the second argument.
[DomName("selectionStart")]
int SelectionStart { get; set; }
Property Value
TextLength
Gets the codepoint length of the control's value.
[DomName("textLength")]
int TextLength { get; }
Property Value
Type
Gets the type (textarea).
[DomName("type")]
string Type { get; }
Property Value
Value
Gets or sets the value.
[DomName("value")]
string Value { get; set; }
Property Value
Wrap
Gets or sets the wrap HTML attribute, indicating how the control wraps text.
[DomName("wrap")]
string? Wrap { get; set; }
Property Value
Methods
Select(int, int, string?)
Selects a range of text, and sets selectionStart and selectionEnd. If either argument is greater than the length of the value, it is treated as pointing to the end of the value. If end is less than start, then both are treated as the value of end.
[DomName("setSelectionRange")]
void Select(int selectionStart, int selectionEnd, string? selectionDirection = null)
Parameters
selectionStart
intThe start of the selection.
selectionEnd
intThe end of the selection.
selectionDirection
stringOptional: The direction of the selection.
SelectAll()
Selects the contents of the textarea.
[DomName("select")]
void SelectAll()