Open
Description
Hey guys. I'm trying to use SyntaxHighlighter inside blockRenderers for code-block but naturally, as each block inside blockRenderers expects to return a string (and not a Node, aka, Element), this won't work.
Example:
blockRenderers: {
"code-block": block => {
return (
<SyntaxHighlighter language='javascript' style={docco}>
{block.getText()}
</SyntaxHighlighter>
);
}
}
So I wonder, what is the alternative to this. How can we add code highlighting inside blockRenderers?
Thanks a bunch in advance.
Metadata
Metadata
Assignees
Labels
No labels