@churchapps/apphelper-markdown
Version:
ChurchApps markdown/lexical editor components
9 lines (8 loc) • 541 B
JavaScript
"use client";
import { jsx as _jsx } from "react/jsx-runtime";
import { Suspense } from "react";
import { lazy } from 'react';
const Editor = lazy(() => import('./Editor'));
export function MarkdownPreview({ value: markdownString = "", textAlign, showFloatingEditor = false, ...props }) {
return _jsx(Suspense, { fallback: _jsx("div", { children: markdownString || "" }), children: _jsx(Editor, { mode: "preview", value: markdownString || "", textAlign: textAlign, element: props.element, showFloatingEditor: showFloatingEditor }) });
}