diff --git a/client/src/components/Faq/Answer.jsx b/client/src/components/Faq/Answer.jsx
index d604a5a9..28206de3 100644
--- a/client/src/components/Faq/Answer.jsx
+++ b/client/src/components/Faq/Answer.jsx
@@ -3,6 +3,7 @@ import Quill from "../UI/Quill";
import { createUseStyles } from "react-jss";
import PropTypes from "prop-types";
import { Interweave } from "interweave";
+import { MdLaunch } from "react-icons/md";
const useStyles = createUseStyles(theme => ({
answerContainer: {
@@ -22,6 +23,11 @@ const useStyles = createUseStyles(theme => ({
"&:hover": {
textDecoration: admin => admin && "underline"
}
+ },
+ externalLinkIcon: {
+ fontSize: "14px",
+ padding: " 0 0.4em",
+ color: "#00F"
}
}));
@@ -78,7 +84,7 @@ export const Answer = ({
style={{ display: "flex" }}
>
-
+
)}
@@ -94,3 +100,17 @@ Answer.propTypes = {
setIsEditAnswer: PropTypes.func,
onSetFaq: PropTypes.func
};
+
+function TransformExternalLink(node, children) {
+ const classes = useStyles();
+ if (node.tagName == "A" && !node.getAttribute("href").startsWith("/")) {
+ return (
+
+
+ {children}
+
+
+
+ );
+ }
+}
diff --git a/client/src/components/ToolTip/AccordionToolTip.js b/client/src/components/ToolTip/AccordionToolTip.js
index 67e60a92..5422a4f9 100644
--- a/client/src/components/ToolTip/AccordionToolTip.js
+++ b/client/src/components/ToolTip/AccordionToolTip.js
@@ -2,6 +2,8 @@ import React from "react";
import PropTypes from "prop-types";
import { createUseStyles } from "react-jss";
import clsx from "clsx";
+import { Interweave } from "interweave";
+import { MdLaunch } from "react-icons/md";
const useStyles = createUseStyles({
accordionTooltipLabel: {
@@ -69,18 +71,32 @@ const AccordionToolTip = ({
classes.accordionTooltipLabel,
classes.disabledDescription
)}
- dangerouslySetInnerHTML={{ __html: `${description}` }}
- >
+ >
+
+
) : (
-
+
+
+
)}
>
);
};
+function TransformExternalLink(node, children) {
+ const classes = useStyles();
+ if (node.tagName == "A" && !node.getAttribute("href").startsWith("/")) {
+ return (
+
+
+ {children}
+
+
+
+ );
+ }
+}
+
AccordionToolTip.propTypes = {
description: PropTypes.string,
setShowDescription: PropTypes.func,