@manuscripts/plugin-persist
v0.1.2
Published
This plugin ensures that all nodes which need ids (i.e. `id` is defined in the node spec's attributes) are given an id, and that there aren't any duplicate ids in the document.
Downloads
7
Readme
@manuscripts/plugin-persist
This repo provides a plugin that automatically adds ID attributes to Nodes that need them, to facilitate persistent storage in Pouch/Couchbase.
Usage
Install:
npm i @manuscripts/plugin-persist
Add to Editor on setup
import persist from @manuscripts/plugin-persist
EditorState.create({
doc,
schema,
plugins: [persist()],
})
Development
git clone [email protected]:mpapp-public/manuscripts-plugin-persist.git
cd manuscripts-plugin-persist
npm i
npm run typecheck
npm run lint
npm run build