@tryghost/mg-html-mobiledoc
v0.16.3
Published
A little wrapper tool for migrating all HTML fields of posts to mobiledoc
Maintainers
Keywords
Readme
Migrate HTML -> Mobiledoc
A little wrapper tool for migrating all HTML fields of posts to mobiledoc
Install
npm install @tryghost/mg-html-mobiledoc --save
or
pnpm add @tryghost/mg-html-mobiledoc
Usage
var mgHtmlMobiledoc = require('tryghost/mg-html-mobiledoc');
var convertedData = mgHtmlMobiledoc.convert(myData);Data structure passed in can be either
var myData = {
posts: [
{
html: '<h2>Good stuff here</h2>'
}
]
}or
var 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 tests
Copyright & License
Copyright (c) 2013-2026 Ghost Foundation - Released under the MIT license.
