diff --git a/components/details/details-content.tsx b/components/details/details-content.tsx
index 2b739f9..f83eb23 100644
--- a/components/details/details-content.tsx
+++ b/components/details/details-content.tsx
@@ -21,6 +21,7 @@ import {
} from "@/service/master-user";
import { saveActivity } from "@/service/activity-log";
import { Badge } from "../ui/badge";
+import { formatTextToHtmlTag } from "@/utils/global";
type TabKey = "trending" | "comments" | "latest";
@@ -320,6 +321,16 @@ export default function DetailContent() {
);
}
+ function removeImgTags(htmlString?: { __html: string }) {
+ const parser = new DOMParser();
+ const doc = parser.parseFromString(String(htmlString?.__html), "text/html");
+
+ const images = doc.querySelectorAll("img");
+ images.forEach((img) => img.remove());
+
+ return { __html: doc.body.innerHTML };
+ }
+
return (
<>
@@ -480,9 +491,10 @@ export default function DetailContent() {
{/*
*/}
diff --git a/components/editor/custom-editor.js b/components/editor/custom-editor.js
index 95886a7..cee120f 100644
--- a/components/editor/custom-editor.js
+++ b/components/editor/custom-editor.js
@@ -1,7 +1,7 @@
-// components/custom-editor.js
-
-import React from "react";
+import React, { useCallback, useEffect, useRef, useState } from "react";
import { CKEditor } from "@ckeditor/ckeditor5-react";
+
+import "@/styles/custom-editor.css";
import Editor from "@/vendor/ckeditor5/build/ckeditor";
function CustomEditor(props) {
@@ -47,7 +47,7 @@ function CustomEditor(props) {
padding: 1rem;
}
p {
- margin: 0.5em 0;
+ margin: 0.5em 0 !important;
}
h1, h2, h3, h4, h5, h6 {
margin: 1em 0 0.5em 0;
@@ -72,98 +72,6 @@ function CustomEditor(props) {
},
}}
/>
-
);
}
diff --git a/components/editor/view-editor.js b/components/editor/view-editor.js
index 31e7db9..1e579b0 100644
--- a/components/editor/view-editor.js
+++ b/components/editor/view-editor.js
@@ -48,7 +48,8 @@ function ViewEditor(props) {
.ckeditor-view-wrapper {
border-radius: 6px;
overflow: hidden;
- box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1),
+ box-shadow:
+ 0 1px 3px 0 rgba(0, 0, 0, 0.1),
0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
diff --git a/components/table/article-table.tsx b/components/table/article-table.tsx
index 3a50853..919c99d 100644
--- a/components/table/article-table.tsx
+++ b/components/table/article-table.tsx
@@ -316,7 +316,7 @@ export default function ArticleTable() {
return cellValue;
}
},
- [article, page]
+ [article, page],
);
let typingTimer: NodeJS.Timeout;
@@ -445,8 +445,8 @@ export default function ArticleTable() {