Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: update useRenderHtmlPlugin to target specific HTML element

robinfcecc07f5ed5
diff --git a/ui/src/pages/Questions/Detail/components/Answer/index.tsx b/ui/src/pages/Questions/Detail/components/Answer/index.tsx
index fb4de275..931b1a75 100644
--- a/ui/src/pages/Questions/Detail/components/Answer/index.tsx
+++ b/ui/src/pages/Questions/Detail/components/Answer/index.tsx
@@ -60,7 +60,7 @@ const Index: FC<Props> = ({
const [searchParams] = useSearchParams();
const answerRef = useRef<HTMLDivElement>(null);
- useRenderHtmlPlugin(answerRef);
+ useRenderHtmlPlugin(answerRef.current?.querySelector('.fmt') as HTMLElement);
const acceptAnswer = () => {
acceptanceAnswer({