Disable html filtering

I have found more issues with the Admin api and html input.

For example, nested lists end up as non-nested lists after being submitted through the admin api. Image links disappear (even though they exist in the original html).

When I pass html to the admin api I would expect it to not be touched at all.

Is it possible to disable all filtering?

The only way to disable converting html to the supported rich-text formatting is to import the content as a html card:

<!--kg-card-begin: html-->
... your html content...
<!--kg-card-end: html-->

It won’t give you the nicest editing experience though so it will depend on your use-case. Importing HTML converts to the internal mobiledoc format so it’s a lossy operation, you can’t import anything that isn’t supported natively by the editor.

This is mentioned in the “creating a post” API docs:

The post creation endpoint is also able to convert HTML into mobiledoc. The conversion generates the best available mobiledoc representation, meaning this operation is lossy and the HTML rendered by Ghost may be different from the source HTML.

Thanks Kevin. Works now.


I’m using ghost to publish docs generated by another tool so raw unmodified HTML is very important. Editing experience is absolutely not important because the content is written in asciidoc anyway and everything is converted to different formats for publishing.

Ghost versoin 5.2.2

I think you have an errant = in place of a += there that’s resetting your html variable meaning the starting comment isn’t seen.

Yup. Works now. Awesome!