Purge empty links v2.6 - nossas/slate-editor GitHub Wiki
Guide to purge the empty link objects of v2.6
Requirements
- Node.js version: >= v7.10.0
Installation
mkdir slate-editor-purge-empty-links
(make a new directory)cd slate-editor-purge-empty-links
(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/da9213eb1b1068090afd10cdb9e3b486/raw/129e4eaf4e2e3f869b64fa24732b5394f4384dda/slate-editor-purge-empty-links.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: purge empty link objects
Issue
Script to normalize the slate-editor's nested node nossas/bonde-client#654