@crystallize/content-transformer
v9.2.0
Published
Validation and parsing for Crystallize rich text content
Downloads
1,507
Readme
Crystallize Content Transformer
Validation, parsing and transforming for Crystallize Content. Makes it easy to build React Commerce solutions with Product Information Management powered by Crystallize that enable Fast Ecommerce API.
Install
yarn add @crystallize/content-transformer
Validate
import validator from '@crystallize/content-transformer';
const isValid = validator.isModelValid(myModel);
const validationDetails = validator.isModelValidVerbose(myModel);
toHTML
import toHTML from '@crystallize/content-transformer/toHTML';
toHtml(contentModel);
toText
import toText from '@crystallize/content-transformer/toText';
toText(contentModel);