Is mobiledoc removed from Ghost

Is Mobiledoc format removed from the Ghost?

Whenever I try calling the API endpoint, the mobiledoc is always null.


  • Ghost 5.69.0

Anyone from Ghost team? I know not Ghost is using Lexical editor. But the Developer Docs are not updated yet. There is no proper documentation of using APIs with this newly updated editor. Because calling the GET posts endpoint returns the mobiledoc null and no sign of post content in the API response.

This update broke the entire working of existing APIs and needs rebuilding.

@Hannah @DavidDarnes @Kevin

There should a lexical field that has the post content, @mcnaveen. At least there was a couple versions ago!

1 Like

Ah. Previously it was there. But in the most recent version it got removed afaik.

It’s definitely still there, because it’s the new way Ghost is storing data. I took a look at the way the admin panel is requesting post content, and it looks like this:
Request Method:

Note especially that it’s passing the formats wanted: formats=mobiledoc%2Clexical
If you aren’t currently passing lexical as a wanted format, I’d try that.

Or if you’re using the SDK, looks like you need to pass the format: {id: '652b004f370d650001bd59d3', formats: ['lexical']})

(Browse works similarly.)


Thanks a lot @Cathy_Sarisky

1 Like

Note that explicitly requesting ?formats=mobiledoc will not cause mobiledoc to be included.