clepit_core 0.3.0
clepit_core: ^0.3.0 copied to clipboard
The Clepit block-style editor for Dart and Flutter. Native twin of @clepit/core with the same JSON document model, for web, mobile, and desktop.
clepit_core #
The Clepit block-style editor for Dart and Flutter: the native twin of @clepit/core, with the same JSON document model, editing and read-only rendering from one codebase, targeting web, mobile, and desktop. Documents are interchangeable: EditorData.toJson() here parses with the TypeScript package and vice versa.
Install #
flutter pub add clepit_core
Quick start #
import 'package:clepit_core/clepit_core.dart';
final controller = EditorController(initial: EditorData.fromJson(documentJson));
Editor(
controller: controller,
config: EditorConfig(onChange: (data) => save(data)),
);
Render a saved document read-only, no editing chrome:
Renderer(config: RendererConfig(data: document));
Documentation #
The full documentation lives at clepit.com/docs:
License #
MIT