@atlaskit/editor-common
Version:
A package that contains common classes and components for editor and renderer
14 lines (13 loc) • 651 B
TypeScript
import type { DocNode } from '@atlaskit/adf-schema';
/**
* Creates ADF from HTML string.
* This is particularly useful for providing translations in HTML to be supported and we convert back to ADF here
* See: https://developer.atlassian.com/platform/localization/i18n-formatting/avoiding-concatenation/
*
* This function only supports a subset of the schema as it is intended for translations, but it supports
* SSR as it has no DOM dependencies and is lightweight.
*
* @param html - The HTML string to convert to ADF
* @returns ADF DocNode or undefined if parsing fails
*/
export declare const createADFFromHTML: (html: string) => DocNode;