Skip to content

A rust re-implementation of the quill delta format

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

mundo-68/quill-delta-rs

Repository files navigation

Quill-delta-rs

This is a RUST implementation of the well-known Quill Delta library. You can find the original JavaScript library at quill

The functionality provided by this package is:

  • Read Delta documents from string. Implemented as a feature,
  • Edit the Delta document using operational transform commands,
  • Write the Delta document to a json-formatted string.

The library provided is completely free of any formatting limitations. So there are no checks that the attributes provided on a Delta operation are actually valid.

Documentation:

Usage

fn main() {
    // create a delta and insert a string.
    let mut delta = Delta::default();
    delta.insert("Test");

    // create a link, and insert in to the delta document
    let mut attr = Attributes::default();
    attr.insert("src", "http://quilljs.com/image.png");
    delta.insert_attr( "link", attr);

    // Translate the delta document to a json string, and back.
    let json = serde_json::to_string(&delta).unwrap();
    let delta2: Delta = serde_json::from_str(&json).unwrap();
}

About the diffs packages

The crate diffs was developed by Pierre-Étienne Meunier [email protected]. It is published on a private repository which can be publicly accessed, but not through Cargo. I put a copy of the diffs crate into this one for convenience.

As shown in the Cargo.toml file, the diffs crate, the license is MIT/Apache-2.0.
All credits, etc., etc. for this crate should go to the original author.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Testing

There is no HTML DOM relation in quill-delta-rs.
For testing use:

cargo test

Other implementations

About

A rust re-implementation of the quill delta format

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages