D.A.B.Tv0.0.33 Tutorial API DABT Tools ↗ GitHub ↗

tui.text.mode

tui.text.mode ID markdown|syntax|plain

Styles a textarea’s source as Markdown while typing (headings, emphasis, code, links, quotes, lists, fences; characters, columns, cursor and selection unchanged, only the styling differs), highlights only its Markdown delimiters (syntax: the text keeps the widget style), or back to plain.

Notes

  • Returns 1 for non-textarea widgets or an unknown mode.
  • Same as <textarea mode="markdown|syntax">.

Example

tui.text.mode notes markdown