fix(SW-1035): Fixed issue when is returned from CS inside RTE
This commit is contained in:
committed by
Matilda Landström
parent
ed1574838a
commit
ba7cd0798a
@@ -309,6 +309,29 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.span]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
let props = extractPossibleAttributes(node.attrs)
|
||||
const className = props.className
|
||||
|
||||
if (className) {
|
||||
if (hasAvailableULFormat(className)) {
|
||||
// @ts-ignore: We want to set css modules classNames even if it does not correspond
|
||||
// to an existing class in the module style sheet. Due to our css modules plugin for
|
||||
// typescript, we cannot do this without the ts-ignore
|
||||
props.className = styles[className]
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<span {...props}>{next(node.children, embeds, fullRenderOptions)}</span>
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.reference]: (
|
||||
node: RTENode,
|
||||
embeds: EmbedByUid,
|
||||
|
||||
@@ -27,6 +27,7 @@ export enum RTETypeEnum {
|
||||
ol = "ol",
|
||||
p = "p",
|
||||
reference = "reference",
|
||||
span = "span",
|
||||
table = "table",
|
||||
tbody = "tbody",
|
||||
td = "td",
|
||||
|
||||
Reference in New Issue
Block a user