Skip to content

About

Native Rust Lexical, mirrored from wevm/lexical

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Lexical for Rust

A Rust port of Lexical's model and headless packages, at parity with the JS implementation: the same documents give the same editor state and the same JSON, byte for byte. The crate is lexical-ui. It's developed in wevm/lexical under rust/, and each release is mirrored to wevm/lexical-rust; CHANGELOG.md lists them.

use lexical_ui::{create_editor, get_root, CreateEditorArgs};

let editor = create_editor(CreateEditorArgs::default());
let state = editor.parse_editor_state(json)?;
let text = state.read(|| get_root().get_text_content());
let compact = state.to_json(true).to_string();
  • DESIGN.md: decisions, features per package, milestones.
  • PARITY.md: what is ported, from which JS files, checked by which vectors, and the documented exceptions.
  • cargo run -p lexical-conformance replays the conformance vectors that packages/lexical-conformance records from the JS packages.

MIT licensed, like Lexical.

About

Native Rust Lexical, mirrored from wevm/lexical

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages