UNPKG

@churchapps/apphelper-markdown

Version:

ChurchApps markdown/lexical editor components

9 lines (8 loc) 558 B
"use client"; import { jsx as _jsx } from "react/jsx-runtime"; import { lazy, Suspense } from "react"; import { Loading } from "@churchapps/apphelper"; const Editor = lazy(() => import("./Editor")); export function MarkdownEditor({ value: markdownString = "", onChange, style, textAlign, placeholder }) { return _jsx("div", { id: "markdown-editor-wrapper", children: _jsx(Suspense, { fallback: _jsx(Loading, {}), children: _jsx(Editor, { value: markdownString, onChange: onChange, style: style, textAlign: textAlign, placeholder: placeholder }) }) }); }