# prismic-richtext **Repository Path**: mirrors_TrySound/prismic-richtext ## Basic Information - **Project Name**: prismic-richtext - **Description**: A helper to build generic tree from rich text raw json - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-26 - **Last Updated**: 2026-02-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## A helper to build generic tree from rich text raw json ### Get a generic tree from a richtext ```javascript import PrismicRichText from 'prismic-richtext'; PrismicRichText.asTree(doc.data.myRichText) ``` ### Get a serialized tree from a richtext You can find an example here: https://github.com/prismicio/prismic-dom/blob/master/src/index.js ```javascript import PrismicRichText from 'prismic-richtext'; // define a serialize function to manage your fragment // you can use the 'Element' Helper from PrismicRichText to match the different fragments function serialize() {...} PrismicRichText.serialize(doc.data.myRichText, serialize, htmlSerializer) ```