codemirror 0.2.0

A wasm-bingen wrapper for CodeMirror
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use web_sys::Element;

use crate::{GutterId, LineHandle};

pub trait DocApi {
    fn value(&self) -> Option<String>;
    fn set_value(&self, value: &str);
    fn set_gutter_marker<H>(&self, line_handle: H, id: GutterId, el: &Element) -> LineHandle
    where
        H: Into<LineHandle>;
    fn clear_gutter_marker<H>(&self, line_handle: H, id: GutterId) -> LineHandle
    where
        H: Into<LineHandle>;
    fn clear_gutter(&self, id: GutterId);
}