0.6.3 • Published 9 months ago

@tyzo/page-editor v0.6.3

Weekly downloads
-
License
-
Repository
github
Last release
9 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

9 months ago

0.6.2

9 months ago

0.6.1

9 months ago

0.6.0

9 months ago

0.5.1

9 months ago

0.5.0

9 months ago

0.4.12

9 months ago

0.4.10

9 months ago

0.4.11

9 months ago

0.4.9

10 months ago

0.4.8

10 months ago

0.3.9

10 months ago

0.4.5

10 months ago

0.3.6

10 months ago

0.4.4

10 months ago

0.3.5

10 months ago

0.4.7

10 months ago

0.3.8

10 months ago

0.4.6

10 months ago

0.3.7

10 months ago

0.4.1

10 months ago

0.3.2

10 months ago

0.4.0

10 months ago

0.3.1

10 months ago

0.4.3

10 months ago

0.3.4

10 months ago

0.4.2

10 months ago

0.3.3

10 months ago

0.3.0

11 months ago

0.2.5

1 year ago

0.2.4

1 year 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