Any working real example on how to transform any HTML to ADF in Typescript?
- So using adf-schema package throws an error
Module ‘“@atlaskit/adf-schema”’ has no exported member ‘defaultSchema’
no matter what I do. Using the cjs package and pointing directly to the JS file with ts ignores fixes it.
// @ts-ignore
import { defaultSchema } from “@atlaskit/adf-schema/dist/cjs/schema/default-schema.js”; - Even when I get the great atlaskit package to work, it does not work all the time. Sometimes the ADF is invalid
- Tried using wouterken/htmltoadf: An HTML to Atlassian Document Format (ADF) converter, written in Rust (github.com) but same issue. Sometimes it replaces “<br>” at the first level with hardbreaks which are, according to the schema, invalid at the top level (direclty in the content)
Has anyone successfully implemented HTML to ADF conversion?
Included a sample HTML of some text with our company signature (replaced urls). It’s pretty complex for a signature but it’s an example of what I am unable to convert.
test.txt (10.3 KB)
Any help would be appreciated