Merged in fix/SW-2848-RTE-with-copied-divs (pull request #2173)
fix: handle when content has copied divs from episervers RTE * fix: handle when content has copied divs from episervers RTE Approved-by: Matilda Landström
This commit is contained in:
committed by
Linus Flood
parent
fe71348827
commit
cc34cdcf74
@@ -336,6 +336,28 @@ export const renderOptions: RenderOptions = {
|
||||
<span {...props}>{next(node.children, embeds, fullRenderOptions)}</span>
|
||||
)
|
||||
},
|
||||
[RTETypeEnum.div]: (
|
||||
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 (
|
||||
<div {...props}>{next(node.children, embeds, fullRenderOptions)}</div>
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.reference]: (
|
||||
node: RTENode,
|
||||
|
||||
Reference in New Issue
Block a user