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

48
types/rte/enums.ts Normal file
View File

@@ -0,0 +1,48 @@
export enum EmbedTypesEnum {
block = 'block',
display = 'display',
download = 'download',
inline = 'inline',
link = 'link',
}
export type EmbedTypes = keyof typeof EmbedTypesEnum
/** Copied from https://github.com/contentstack/contentstack-utils-javascript/blob/master/src/nodes/node-type.ts */
export enum RTETypeEnum {
a = "a",
blockquote = "blockquote",
code = "code",
doc = "doc",
embed = "embed",
h1 = "h1",
h2 = "h2",
h3 = "h3",
h4 = "h4",
h5 = "h5",
h6 = "h6",
hr = "hr",
img = "img",
li = "li",
ol = "ol",
p = "p",
reference = "reference",
table = "table",
tbody = "tbody",
td = "td",
text = "text",
tfoot = "tfoot",
th = "th",
thead = "thead",
tr = "tr",
ul = "ul",
}
export type RTEType = keyof typeof RTETypeEnum
export enum RTEItemTypeEnum {
asset = "asset",
entry = "entry",
}
export type RTEItemType = keyof typeof RTEItemTypeEnum