Standard components
The package defines a couple of standard components that pretty much every page editor needs.
- Heading:
h1toh6. - Paragraph: Text which will be rendered as
>p<. - Stack: This is a component that lays out children vertically or horizontally. It's using flex box.
-
Section: A
>section<element with anidso it can be navigated to. - Link: A
>a<element. - Ul: Unordered list
- Ol: Ordered list
- HTML: Custom html which will be injected as is
You use it like this
import { Editor, Config } from "@tyzo/page-editor";
import { StandardComponents } from "@tyzo/page-editor/standardComponents";
const config: Config = {
components: {
...StandardComponents,
}
}