feat: json rich text editor, blocks, asides, general structure

This commit is contained in:
Simon Emanuelsson
2024-02-07 11:57:36 +01:00
parent 2bd4e25403
commit 66faa41e98
53 changed files with 966 additions and 211 deletions

View File

@@ -0,0 +1,13 @@
import styles from "./preamble.module.css"
import { RTETypeEnum } from "@/types/rte/enums"
import type { EmbedByUid } from "@/types/components/jsontohtml"
import type { RTENext, RTEDefaultNode } from "@/types/rte/node"
import type { RenderOptions } from "@/types/rte/option"
export const renderOptions: RenderOptions = {
[RTETypeEnum.p]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
return <p className={styles.preamble}>{next(node.children, embeds, fullRenderOptions)}</p>
},
}