@x-poppy/page-editor
v1.0.0
Published
## Usage
Downloads
6
Readme
Poppy Page Editor
Usage
npm install @x-poppy/page-editor
Editor
// EditPage
import { PageEditor } from '@x-poppy/page-editor/editor';
function EditPage() {
const onSaveCallback = useCallback((data) => {
console.log('Saved Data', data);
}, [])
return (
<PageEditor data={initData as any} onPublish={onSaveCallback}/>
)
}
Render
// PreviewPage
import { PageRender } from '@x-poppy/page-editor/render';
function PreviewPage() {
return (
<PageRender data={initData as any} />
)
}