Skip to content

ling-shan/poppy-web-library-template

Repository files navigation

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} />
  )
}

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published