@tryghost/mg-html-lexical
v0.10.2
Published
A little wrapper tool for migrating all HTML fields of posts to Lexical
Downloads
1,617
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
pnpm 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 = {
posts: [
{
html: '<h2>Good stuff here</h2>'
}
]
}or
let myData = {
data: {
posts: [
{
html: '<h2>Good stuff here</h2>'
}
]
}
}Develop
This is a mono repository, managed with Nx and pnpm workspaces.
Follow the instructions for the top-level repo.
git clonethis repo &cdinto it as usual- Run
pnpm installto install top-level dependencies.
Run
pnpm dev
Test
pnpm lintrun just eslintpnpm testrun lint and testspnpm test:localbuild and run tests (for single-package development)
Copyright & License
Copyright (c) 2013-2026 Ghost Foundation - Released under the MIT license.
