Text Class
https://dom.spec.whatwg.org/#interface-text
public class Text : CharacterData- Inheritance
CharacterDataText
Constructors
| Name | Description |
|---|---|
| Text(string) | Creates a text node with the given data. |
Text(string)
CharacterData.csCreates a text node with the given data.
public Text(string data = "")Properties
| Name | Description |
|---|---|
| AssignedSlot | Gets the open shadow tree slot the text node is assigned to, or null when it is not assigned. |
| NodeName | Gets the name of the node, which is always #text. |
| NodeType | Gets the type of the node, which is always TEXT_NODE. |
| WholeText | https://dom.spec.whatwg.org/#dom-text-wholetext |
AssignedSlot
CharacterData.csGets the open shadow tree slot the text node is assigned to, or null when it is not assigned.
public HtmlSlotElement? AssignedSlot { get; }NodeName
CharacterData.csNodeType
CharacterData.csWholeText
CharacterData.cshttps://dom.spec.whatwg.org/#dom-text-wholetext
public string WholeText { get; }Methods
| Name | Description |
|---|---|
| ConvertPointFromNode(DomPointInit, GeometryNode, ConvertCoordinateOptions?) | Converts a point from the coordinates of a node to the coordinates of the text (https://drafts.csswg.org/cssom-view/#dom-geometryutils-convertpointfromnode). |
| ConvertQuadFromNode(DomQuadInit, GeometryNode, ConvertCoordinateOptions?) | Converts a quad from the coordinates of a node to the coordinates of the text, which are the ones of its parent element (https://drafts.csswg.org/cssom-view/#dom-geometryutils-convertquadfromnode). |
| ConvertRectFromNode(DomRectReadOnly, GeometryNode, ConvertCoordinateOptions?) | Converts a rectangle from the coordinates of a node to the coordinates of the text (https://drafts.csswg.org/cssom-view/#dom-geometryutils-convertrectfromnode). |
| GetBoxQuads(BoxQuadOptions?) | Returns the quads of the text (https://drafts.csswg.org/cssom-view/#dom-geometryutils-getboxquads): the rectangles of its text fragments (see Range.GetClientRects), in the coordinates of the viewport or of BoxQuadOptions.RelativeTo. |
| SplitText(uint) | https://dom.spec.whatwg.org/#concept-text-split |
ConvertPointFromNode(DomPointInit, GeometryNode, ConvertCoordinateOptions?)
CssomView.GeometryUtils.csConverts a point from the coordinates of a node to the coordinates of the text (https://drafts.csswg.org/cssom-view/#dom-geometryutils-convertpointfromnode).
public DomPoint ConvertPointFromNode(DomPointInit point, GeometryNode from, ConvertCoordinateOptions? options = null)ConvertQuadFromNode(DomQuadInit, GeometryNode, ConvertCoordinateOptions?)
CssomView.GeometryUtils.csConverts a quad from the coordinates of a node to the coordinates of the text, which are the ones of its parent element (https://drafts.csswg.org/cssom-view/#dom-geometryutils-convertquadfromnode).
public DomQuad ConvertQuadFromNode(DomQuadInit quad, GeometryNode from, ConvertCoordinateOptions? options = null)ConvertRectFromNode(DomRectReadOnly, GeometryNode, ConvertCoordinateOptions?)
CssomView.GeometryUtils.csConverts a rectangle from the coordinates of a node to the coordinates of the text (https://drafts.csswg.org/cssom-view/#dom-geometryutils-convertrectfromnode).
public DomQuad ConvertRectFromNode(DomRectReadOnly rect, GeometryNode from, ConvertCoordinateOptions? options = null)GetBoxQuads(BoxQuadOptions?)
CssomView.GeometryUtils.csReturns the quads of the text (https://drafts.csswg.org/cssom-view/#dom-geometryutils-getboxquads): the rectangles of its text fragments (see Range.GetClientRects), in the coordinates of the viewport or of BoxQuadOptions.RelativeTo.
public IReadOnlyList<DomQuad> GetBoxQuads(BoxQuadOptions? options = null)SplitText(uint)
CharacterData.cshttps://dom.spec.whatwg.org/#concept-text-split