View Source Yex.XmlText (y_ex v0.6.3)

Extends Y.Text to represent a Y.Xml node.

Summary

Functions

The next sibling of this type. Is null if this is the last child of its parent.

The parent that holds this type. Is null if this xml is a top-level XML type.

The previous sibling of this type. Is null if this is the first child of its parent.

Types

@type delta() :: Yex.Text.delta()
@type t() :: %Yex.XmlText{doc: reference(), reference: reference()}

Functions

Link to this function

apply_delta(xml_text, delta)

View Source
@spec apply_delta(t(), delta()) :: :ok | :error
Link to this function

delete(xml_text, index, length)

View Source
@spec delete(t(), integer(), integer()) :: :ok | :error
Link to this function

format(xml_text, index, length, attr)

View Source
@spec format(t(), integer(), integer(), map()) :: :ok | :error
Link to this function

insert(xml_text, index, content)

View Source
@spec insert(t(), integer(), Yex.input_type()) :: :ok | :error
Link to this function

insert(xml_text, index, content, attr)

View Source
@spec insert(t(), integer(), Yex.input_type(), map()) :: :ok | :error
@spec length(t()) :: integer()
@spec next_sibling(t()) :: Yex.XmlElement.t() | t() | nil

The next sibling of this type. Is null if this is the last child of its parent.

@spec parent(t()) :: Yex.XmlElement.t() | Yex.XmlFragment.t() | nil

The parent that holds this type. Is null if this xml is a top-level XML type.

@spec prev_sibling(t()) :: Yex.XmlElement.t() | t() | nil

The previous sibling of this type. Is null if this is the first child of its parent.

@spec to_string(t()) :: binary()