prosemirror-compress-pubpub
This repo has been forked from xylk/prosemirror-compress to add some pubpub-editor specific changes and bug fixes.
Installation
npm install prosemirror-compress-pubpub
documentation
[('compress' || 'uncompress') + ('State' || 'Selection' || 'Step') + 'JSON']()
Renames known keys and values. Maintains JSON structure.
let compressedStateJSON = let editorState = EditorState let compressedSelectionJSON = let selection = Selection let compressedStepsJSON = /*steps array*/let steps = compressedStepsJSON
uncompressed vs compressed
,"doc":
,"d":
compressStepsLossy()
Merges all the steps that can be merged.
let steps =
keysMappers()
For compressing and uncompressing using custom keys maps.
let keysMapper inverseKeysMapper = let compressedJSON = let json =