Open margitZ opened 7 years ago
Links in the call background markdown don't appear to be converted to HTML. I think the above solution is no longer in use?
Those of you with more coding experience might have a more efficient method, but this seems to work and could go in the ActionInfo
component at line 22:
URL = "";
var link = "";
var pattern = /\[(.+?)\]\((.+?)\)/;
while (pattern.test(callBackgroundMd)) {
link = pattern.exec(callBackgroundMd);
callBackgroundMd = callBackgroundMd.replace(pattern, URL.concat('<a href="',link[2],'">',link[1],"</a>"));
}
also applicable to parsing flexActions
I solved this using two libraries,
markdown
andjsxfromhtml
.Markdown is being parsed to HTML by
markdown
, that HTML is being converted to JSX byjsxfromhtml
and then is renderable within theActionInfo
component: