Crystallize

Crystallize Content Transformer

Validation, parsing and transformations for Crystallize Content

NPM logoCrystallize Content Transformer

Install

yarn add @crystallize/content-transformer

Validate

import validator from '@crystallize/content-transformer';

In React

import CrystallizeContent from '@crystallize/content-transformer/react';
const overrides = { link: p => <MyLinkComponent href={p.metadata.href}>{p.textContent}</MyLinkComponent>};
<CrystallizeContent {...contentModel} overrides={overrides} />

To HTML

import toHTML from '@crystallize/content-transformer/toHTML';toHtml(contentModel);

To text

import toText from '@crystallize/content-transformer/toText';toText(contentModel);

Looks interesting?

Create a free tier account or contact us if you have any questions.

Team up with Crystallize