plushie/widget/text_editor

Text editor widget builder (multi-line text editing).

Types

pub opaque type TextEditor

Values

pub fn a11y(te: TextEditor, a: a11y.A11y) -> TextEditor

Set accessibility properties for this widget.

pub fn build(te: TextEditor) -> node.Node

Build the text editor into a renderable Node.

pub fn font(te: TextEditor, f: font.Font) -> TextEditor

Set the font.

pub fn height(te: TextEditor, h: length.Length) -> TextEditor

Set the height.

pub fn highlight_syntax(
  te: TextEditor,
  lang: String,
) -> TextEditor

Set the syntax highlighting language.

pub fn highlight_theme(
  te: TextEditor,
  theme: String,
) -> TextEditor

Set the syntax highlighting theme.

pub fn ime_purpose(te: TextEditor, p: String) -> TextEditor

Set the IME purpose hint.

pub fn key_bindings(
  te: TextEditor,
  bindings: List(node.PropValue),
) -> TextEditor

Set declarative key binding rules. Each rule is a DictVal.

pub fn line_height(te: TextEditor, h: Float) -> TextEditor

Set the line height.

pub fn max_height(te: TextEditor, h: Float) -> TextEditor

Set the maximum height in pixels.

pub fn min_height(te: TextEditor, h: Float) -> TextEditor

Set the minimum height in pixels.

pub fn new(id: String, content: String) -> TextEditor

Create a new text editor builder.

pub fn padding(te: TextEditor, p: padding.Padding) -> TextEditor

Set the padding.

pub fn placeholder(te: TextEditor, p: String) -> TextEditor

Set the placeholder text.

pub fn placeholder_color(
  te: TextEditor,
  c: color.Color,
) -> TextEditor

Set the placeholder text color.

pub fn selection_color(
  te: TextEditor,
  c: color.Color,
) -> TextEditor

Set the selection highlight color.

pub fn size(te: TextEditor, s: Float) -> TextEditor

Set the size.

pub fn style(te: TextEditor, s: String) -> TextEditor

Set the style.

pub fn width(te: TextEditor, w: length.Length) -> TextEditor

Set the width.

pub fn wrapping(
  te: TextEditor,
  w: wrapping.Wrapping,
) -> TextEditor

Set the text wrapping mode.

Search Document