@tryghost/mg-html-lexical
v0.0.9
Published
A little wrapper tool for migrating all HTML fields of posts to Lexical
Downloads
75
Maintainers
Keywords
Readme
Migrate HTML -> Lexical
A little wrapper tool for migrating all HTML fields of posts to Lexical
Install
npm install @tryghost/mg-html-lexical --save
or
yarn add @tryghost/mg-html-lexical
Usage
var mgHtmlLexical = require('tryghost/mg-html-lexical');
var convertedData = mgHtmlLexical.convert(myData);
Data structure passed in can be either
let myData = {
logger: yourLoggingInstance,
posts: [
{
html: '<h2>Good stuff here</h2>'
}
]
}
or
let myData = {
logger: yourLoggingInstance,
data: {
posts: [
{
html: '<h2>Good stuff here</h2>'
}
]
}
}
Develop
This is a mono repository, managed with lerna.
Follow the instructions for the top-level repo.
git clone
this repo &cd
into it as usual- Run
yarn
to install top-level dependencies.
Run
yarn dev
Test
yarn lint
run just eslintyarn test
run lint and tests
Copyright & License
Copyright (c) 2013-2023 Ghost Foundation - Released under the MIT license.