ygleam/y_text

Functions

pub fn delete(y_text: YText, index: Int, length: Int) -> Nil
pub fn doc(y_text: YText) -> Option(YDoc)
pub fn format(
  y_text: YText,
  index: Int,
  length: Int,
  formattng_attributes: List(#(String, Json)),
) -> Nil
pub fn insert(
  y_text: YText,
  index: Int,
  content: String,
  formattng_attributes: Option(List(#(String, Json))),
) -> Nil
pub fn length(y_text: YText) -> Int
pub fn new() -> YText
pub fn observe(
  y_text: YText,
  cb: fn(YTextEvent, Transaction) -> Nil,
) -> fn() -> Nil
pub fn observe_deep(
  y_text: YText,
  cb: fn(List(AnyYEvent), Transaction) -> Nil,
) -> fn() -> Nil
pub fn parent(y_text: YText) -> Option(YType)
pub fn to_json(y_text: YText) -> BaseType
pub fn to_string(y_text: YText) -> String
Search Document