1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Commands: plain functions that read an [`EditorState`](crate::EditorState),
//! decide whether they apply, and change it through one transaction.
//!
//! Every command returns a [`CommandResult`]: `Ok(Some(update))` when it
//! changed something, `Ok(None)` when it does not apply (so a keymap can try
//! the next binding), and `Err` only when the model rejected a step. Commands
//! that need block types, such as list commands, take them as arguments;
//! extensions resolve the types from the schema and bind the commands.
pub use insert_leaf;
pub use is_block_active;
pub use lift_block;
pub use lift_empty_block;
pub use selected_text_blocks;
pub use set_block_attrs;
pub use set_block_type;
pub use toggle_block_type;
pub use toggle_wrap;
pub use wrap_in;
pub use cancel_composition;
pub use commit_composition;
pub use set_composition;
pub use delete_backward;
pub use delete_forward;
pub use delete_selection;
pub use join_backward;
pub use join_forward;
pub use insert_at;
pub use insert_embed;
pub use insert_inline;
pub use insert_text;
pub use ListType;
pub use join_list_item_backward;
pub use lift_list_item;
pub use sink_list_item;
pub use split_list_item;
pub use toggle_list;
pub use wrap_in_list;
pub use active_marks;
pub use is_mark_active;
pub use marks_at;
pub use set_mark;
pub use toggle_mark;
pub use unset_mark;
pub use update_mark_attrs;
pub use replace_selection;
pub use select_all;
pub use select_blocks;
pub use select_parent;
pub use set_selection;
pub use set_setting;
pub use Slice;
pub use slice_selection;
pub use split_block;
use crateEditorError;
use crateUpdate;
/// What running a command did: `Some` update when it applied, `None` when
/// it did not apply to the current state.
pub type CommandResult = ;