Skip to content

Rich text element parser for node.js & javascript delivery SDK.

License

Notifications You must be signed in to change notification settings

noreiller/kontent-delivery-node-parser

 
 

Repository files navigation

Node.js parser for Rich text elements

This library is an optional addon for the javascript delivery SDK that can be used to resolve rich text elements in node.js environment.

This is an alternative to built-in browserParser that comes native with the SDK and works in browsers.

Usage

import { createRichTextHtmlResolver, createAsyncRichTextHtmlResolver } from '@kontent-ai/delivery-sdk';
import { nodeParser, asyncNodeParser } from '@kontent-ai/delivery-node-parser';

// transform rich text html into json
const json = createRichTextHtmlResolver(nodeParser).resolveRichText(data);

// or
const html = await createAsyncRichTextHtmlResolver(asyncNodeParser).resolveRichText(data);

About

Rich text element parser for node.js & javascript delivery SDK.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 51.3%
  • JavaScript 48.7%