Expand description
The public widget API.
-
EditorStateowns the document, selection, history, paper, zoom, tab width, highlighter, image settings and style. Keep it in your application state. -
markdown_editorbuilds the widget from a&EditorState. -
The widget produces
Actions. Pass them toEditorState::update, which returns anOutputwith aTaskand theEvents that happened. -
EditorState::executeruns aCommandprogrammatically. -
edit: keyboard, mouse and commands. -
source: Markdown source mode. -
view: the widget (page canvas, link bar, status bar). -
toolbar: the built-in toolbar. -
menu: the context menu (right mouse button). -
dialog: the link dialog opened from the context menu.
Structs§
- Action
- A message produced by the widget. Opaque: forward it to
EditorState::update. Create one from aCommandwithAction::from(command)to drive the editor from your own widgets. - Editor
State - The editor state. Keep one per editor in your application.
- Formatting
- Formatting at the caret, for building custom toolbars.
- Markdown
Editor - Builder returned by
markdown_editor. - Output
- Result of
EditorState::update.
Enums§
- Command
- Operations that can be triggered programmatically.
- Event
- Something that happened inside the editor.
- Mode
- Editing mode.
Constants§
- DEFAULT_
TAB_ WIDTH - Default number of spaces inserted by the Tab key.
Functions§
- markdown_
editor - Creates the editor widget for the given state.