0.6.3 • Published 7 months ago

@tyzo/page-editor v0.6.3

Weekly downloads
-
License
-
Repository
github
Last release
7 months ago

Tyzo Page Editor

Tyzo page editor is an open source visual editor for react. You can use it to build custom drag-and-drop experiences with your own React components.

More documentation and a live demo is coming soon.

Documentation Live Demo

Getting Started

Install the package

npm i @tyzo/page-editor --save

Render the editor

import { Editor, Config } from "@tyzo/page-editor";

const config: Config = {
  async save(data) {
    console.log(data);
  },
  headerLeft: <div>Back</div>,
  headerRight: <div>Publish</div>,
  components: {
    HeadingBlock: {
      id: "HeadingBlock",
      name: "Heading Block",
      groupName: "Typography",

      properties: {
        children: {
          name: "children",
          type: "string",
          defaultData: "Heading",
        },
      },
      component: ({ children }: { children: string }) => <h1>{children}</h1>,
    },
  }
}

export function App() {
  return <Editor config={config} />;
}

Render the page

import { Render, Config } from "@tyzo/page-editor";

const config: Config = {
  headerLeft: <div>Back</div>,
  headerRight: <div>Publish</div>,
  components: {
    HeadingBlock: {
      id: "HeadingBlock",
      name: "Heading Block",
      groupName: "Typography",

      properties: {
        children: {
          name: "children",
          type: "string",
          defaultData: "Heading",
        },
      },
      component: ({ children }: { children: string }) => <h1>{children}</h1>,
    },
  }
}

export function App() {
  return (
    <Render
      config={config}
      data={{
        children: ["1"],
        elements: {
          "1": {
            id: "1",
            componentId: "HeadingBlock",
            data: { children: "Hello!" },
          },
        },
      }}
    />
  );
}

Roadmap

  • Drag and drop editor
  • Custom components
  • Breakpoints
  • Pan & zoom page
  • Render page
  • Custom properties
  • Css properties
  • Nested component support with drag and drop support
  • [] Good documentation
  • [] Multiplayer mode
0.6.3

7 months ago

0.6.2

7 months ago

0.6.1

7 months ago

0.6.0

8 months ago

0.5.1

8 months ago

0.5.0

8 months ago

0.4.12

8 months ago

0.4.10

8 months ago

0.4.11

8 months ago

0.4.9

8 months ago

0.4.8

8 months ago

0.3.9

9 months ago

0.4.5

8 months ago

0.3.6

9 months ago

0.4.4

8 months ago

0.3.5

9 months ago

0.4.7

8 months ago

0.3.8

9 months ago

0.4.6

8 months ago

0.3.7

9 months ago

0.4.1

8 months ago

0.3.2

9 months ago

0.4.0

8 months ago

0.3.1

9 months ago

0.4.3

8 months ago

0.3.4

9 months ago

0.4.2

8 months ago

0.3.3

9 months ago

0.3.0

10 months ago

0.2.5

11 months ago

0.2.4

12 months ago

0.2.2

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.0

1 year ago