diff --git a/components/details/details-content.tsx b/components/details/details-content.tsx index 515a5c0..dbb183b 100644 --- a/components/details/details-content.tsx +++ b/components/details/details-content.tsx @@ -13,6 +13,7 @@ type Article = { id: number; title: string; description: string; + htmlDescription: string; categoryName: string; createdAt: string; createdByName: string; @@ -21,7 +22,7 @@ type Article = { title: string; }[]; files: { - file_url: string; + fileUrl: string; file_alt: string; }[]; }; @@ -252,9 +253,9 @@ export default function DetailContent() {
- {articleDetail?.files?.[0]?.file_url ? ( + {articleDetail?.files?.[0]?.fileUrl ? ( Berita
-

+

Mikulnews.com - +
+
- {articleDetail?.description} -

diff --git a/components/editor/tinymce-editor.tsx b/components/editor/tinymce-editor.tsx index b8d8e57..ca67548 100644 --- a/components/editor/tinymce-editor.tsx +++ b/components/editor/tinymce-editor.tsx @@ -197,8 +197,8 @@ const TinyMCEEditor: React.FC = ({ height, language, placeholder, - readonly: readOnly, - disabled, + // readonly: readOnly, + // disabled, branding: false, elementpath: false, resize: false, @@ -270,9 +270,9 @@ const TinyMCEEditor: React.FC = ({ onInit={handleEditorInit} initialValue={initialData} onEditorChange={handleEditorChange} - disabled={disabled} + disabled={disabled || readOnly} apiKey={process.env.NEXT_PUBLIC_TINYMCE_API_KEY} - // init={editorConfig} + init={editorConfig} /> {/* Status bar */} diff --git a/components/form/article/edit-article-form.tsx b/components/form/article/edit-article-form.tsx index 0c0ab7a..d55147c 100644 --- a/components/form/article/edit-article-form.tsx +++ b/components/form/article/edit-article-form.tsx @@ -623,9 +623,7 @@ export default function EditArticleForm(props: { isDetail: boolean }) { alt="main" width={720} height={480} - src={ - detailfiles[mainImage]?.file_url || "/default-avatar.png" - } + src={detailfiles[mainImage]?.fileUrl || "/default-avatar.png"} className="w-[75%] mx-auto" />
@@ -640,7 +638,7 @@ export default function EditArticleForm(props: { isDetail: boolean }) { width={480} height={360} alt={`image-${index}`} - src={file.file_url || "/default-avatar.png"} + src={file.fileUrl || "/default-avatar.png"} className="h-[100px] object-cover w-[150px]" /> @@ -663,7 +661,7 @@ export default function EditArticleForm(props: { isDetail: boolean }) { width={480} height={360} alt={`image-${index}`} - src={file?.file_url || "/default-avatar.png"} + src={file?.fileUrl || "/default-avatar.png"} className="h-[100px] object-cover w-[150px]" />
@@ -683,6 +681,7 @@ export default function EditArticleForm(props: { isDetail: boolean }) {