chore: run prettier --write .
This commit is contained in:
+7
-7
@@ -9,7 +9,7 @@ export interface Attributes {
|
||||
}
|
||||
|
||||
export interface RTEAssetAttrs extends Attributes {
|
||||
"alt": string
|
||||
alt: string
|
||||
"asset-alt": string
|
||||
"asset-link": string
|
||||
"asset-name": string
|
||||
@@ -17,8 +17,8 @@ export interface RTEAssetAttrs extends Attributes {
|
||||
"asset-uid": string
|
||||
"display-type": EmbedTypesEnum.display
|
||||
"content-type-uid": "sys_assets"
|
||||
"inline": false
|
||||
"type": RTEItemTypeEnum.asset
|
||||
inline: false
|
||||
type: RTEItemTypeEnum.asset
|
||||
}
|
||||
|
||||
export interface RTEAnchorAttrs extends Attributes {
|
||||
@@ -27,10 +27,10 @@ export interface RTEAnchorAttrs extends Attributes {
|
||||
}
|
||||
|
||||
export interface RTELinkAttrs extends Attributes {
|
||||
'display-type': EmbedTypesEnum.link
|
||||
'class-name': string
|
||||
'content-type-uid': string
|
||||
'entry-uid': string
|
||||
"display-type": EmbedTypesEnum.link
|
||||
"class-name": string
|
||||
"content-type-uid": string
|
||||
"entry-uid": string
|
||||
locale: Lang
|
||||
href: string
|
||||
target: HTMLAnchorElement["target"]
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
export enum EmbedTypesEnum {
|
||||
block = 'block',
|
||||
display = 'display',
|
||||
download = 'download',
|
||||
inline = 'inline',
|
||||
link = 'link',
|
||||
block = "block",
|
||||
display = "display",
|
||||
download = "download",
|
||||
inline = "inline",
|
||||
link = "link",
|
||||
}
|
||||
|
||||
export type EmbedTypes = keyof typeof EmbedTypesEnum
|
||||
|
||||
+22
-5
@@ -1,5 +1,10 @@
|
||||
import { RTETypeEnum } from "./enums"
|
||||
import type { Attributes, RTEAnchorAttrs, RTEAssetAttrs, RTELinkAttrs } from "./attrs"
|
||||
import type {
|
||||
Attributes,
|
||||
RTEAnchorAttrs,
|
||||
RTEAssetAttrs,
|
||||
RTELinkAttrs,
|
||||
} from "./attrs"
|
||||
import type { EmbedByUid } from "../components/jsontohtml"
|
||||
import type { RenderOptions } from "./option"
|
||||
|
||||
@@ -58,14 +63,26 @@ export type RTEReferenceNode = RTEDefaultNode | RTEAnchorNode
|
||||
|
||||
export type RTENode = RTERegularNode | RTEReferenceNode | RTETextNode
|
||||
|
||||
export type RTERenderMark = (children: React.ReactNode, classname?: string, id?: string) => JSX.Element
|
||||
export type RTERenderMark = (
|
||||
children: React.ReactNode,
|
||||
classname?: string,
|
||||
id?: string
|
||||
) => JSX.Element
|
||||
|
||||
export interface RTEDocument extends RTEDefaultNode {
|
||||
type: RTETypeEnum.doc
|
||||
_version: number
|
||||
}
|
||||
|
||||
export type RTERenderOptionComponent = (node: RTERegularNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => React.ReactNode
|
||||
|
||||
export type RTENext = (nodes: RTENode[], embeds: EmbedByUid, fullRenderOptions: RenderOptions) => string
|
||||
export type RTERenderOptionComponent = (
|
||||
node: RTERegularNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => React.ReactNode
|
||||
|
||||
export type RTENext = (
|
||||
nodes: RTENode[],
|
||||
embeds: EmbedByUid,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => string
|
||||
|
||||
Reference in New Issue
Block a user