clasor-preview-content
v4.1.0
Published
This package renders the clasor content (preview only); Install package using following command:
Downloads
10
Readme
Clasor Preview Content User Guide
This package renders the clasor content (preview only); Install package using following command:
npm i clasor-preview-content
Example
This is an example of package usage:
import React from "react";
import { ClasorPreviewContent, Outline } from "clasor-preview-content";
import "clasor-preview-content/dist/styles.css" //include this file for default styles
const DocumentComponent = (props: IProps) => {
const {
content,
versionId,
outline,
} = props;
const outlineList = outline.startsWith("{\"root\": {\"root\"") ? "[]" : outline;
return (
<>
<ClasorPreviewContent content={content} versionId={versionId} />
<Outline outline={outlineList} />
</>
);
};
export default DocumentComponent;