Skip to main content

editor/
lib.rs

1//! A Notion-style block editor for gpui, over the `markdown` document model.
2//!
3//! ```ignore
4//! editor::init(cx);                       // once, at startup
5//! let editor = cx.new(|cx| editor::Editor::new("# Title", cx));
6//! ```
7//!
8//! `markdown` holds the document, its markdown wire form, and the painting —
9//! all of it testable without a window. What lives here is the half that needs
10//! one: focus, keys, the platform input handler, the mouse, undo, and the menus.
11
12mod app;
13pub use app::AppExt;
14
15mod anchor;
16mod editor;
17mod history;
18mod layout;
19mod link;
20mod paste;
21mod slash;
22mod text_size;
23
24pub use anchor::{Anchor, AnchorId};
25#[doc(hidden)]
26pub use editor::menu::{BLOCK_HANDLE, BLOCK_MENU, SLASH_MENU};
27pub use editor::{
28    CONTEXT, Chrome, Editor, EditorEvent, Formatting, HIGHLIGHT_MARK, Mode,
29    image::{ImageStore, Source},
30    init, keys, turns,
31};
32pub use history::{DEFAULT_UNDO_LIMIT, EditKind, History, Step};
33pub use layout::Layout;
34pub use paste::{PasteContent, PasteContext, PasteHandler};
35pub use text_size::TextSize;