Migrate slate object from v2.4 to v2.6 - nossas/slate-editor GitHub Wiki

Guide to migrate the slate object from < v2.4 to v2.6

Requirements

  • Node.js version: >= v7.10.0

Installation

  • mkdir slate-editor-state-object-migration (make a new directory)
  • cd slate-editor-state-object-migration (enter into directory)
  • yarn init (initialize yarn)
  • yarn add lodash json-stringify-pretty-compact escape-json-node --save (install dependencies)
  • download the script using the command below:
curl -s https://gist.githubusercontent.com/gabrielrtakeda/ad4646ac01be7a6d2acb769d8fa69113/raw/ba832904dce897e092a7a9ed962d1cb9ad611613/slate-editor-state-object-migration.js > ./migration.js
  • update the updateSQL function with your database table data
  • node ./migration.js > migration.sql (execute the script)
  • take the migration.sql file and execute it on your database

Gist

[Nossas] Slate Editor: state object migration from < v2.3 to v2.6

Issue

Script to normalize the slate-editor's nested node nossas/bonde-client#641