fix: add imageContainer reference in rte
This commit is contained in:
@@ -3,7 +3,7 @@ import { renderOptions } from "./renderOptions"
|
||||
import type { EmbedByUid } from "@/types/components/jsontohtml"
|
||||
import type { Embeds } from "@/types/requests/embeds"
|
||||
import type { Node } from "@/types/requests/utils/edges"
|
||||
import { RTETypeEnum } from "@/types/rte/enums"
|
||||
import { AvailableFormatEnum, RTETypeEnum } from "@/types/rte/enums"
|
||||
import type {
|
||||
RTENode,
|
||||
RTERenderOptionComponent,
|
||||
@@ -74,7 +74,6 @@ export function textNodeToHtml(
|
||||
if (node.bold) {
|
||||
text = (fullRenderOptions[RTEMarkType.bold] as RTERenderMark)(text)
|
||||
}
|
||||
|
||||
return text
|
||||
}
|
||||
|
||||
@@ -86,6 +85,10 @@ function next(
|
||||
return nodeChildrenToHtml(nodes, embeds, fullRenderOptions)
|
||||
}
|
||||
|
||||
export function hasAvailableFormat(className?: string) {
|
||||
return className && Object.keys(AvailableFormatEnum).includes(className)
|
||||
}
|
||||
|
||||
export function nodeToHtml(
|
||||
node: RTENode,
|
||||
embeds: EmbedByUid,
|
||||
|
||||
Reference in New Issue
Block a user