Sigil

Markdown edit

A markdown editor with preview.

GUITUIRuns in the browsermarkdown_edit

Preview

Markdown edit, Default, light themeMarkdown edit, Default, dark theme

Usage example

fn markdown_edit_demo(disabled: Signal<bool>) -> NodeBuilder {    let source = signal(String::from(        "# Sigil widgets\n\nEdit me, *live* preview.\n\n- one\n- two",    ));    container()        .layout(LayoutStyle::flex_column().fill_width().height(228.0))        .child(markdown_edit(source).disabled(disabled))}
fn markdown_edit_demo(  disabled: Signal<bool>,) -> NodeBuilder {  let source = signal(String::from(    "# Sigil widgets\n\nEdit me, *live* preview.\n\n- one\n- two",  ));  container()    .layout(      LayoutStyle::flex_column()        .fill_width()        .height(228.0),    )    .child(      markdown_edit(source)        .disabled(disabled),    )}

States

All 4 captured states, each drawn by the window host and by the terminal host.

  • Markdown edit, Default, light themeMarkdown edit, Default, dark theme
    Default
  • Markdown edit, Hover, light themeMarkdown edit, Hover, dark theme
    Hover
  • Markdown edit, Focused, light themeMarkdown edit, Focused, dark theme
    Focused
  • Markdown edit, Disabled, light themeMarkdown edit, Disabled, dark theme
    Disabled

API

NameSignaturePurpose
markdown_editfn markdown_edit(source: Signal<String>) -> MarkdownEditBuilderA markdown editor with preview.