From 0e8b912b3710a6e93708ff9e77bfd51338a46486 Mon Sep 17 00:00:00 2001 From: Hossein Mehrabi Date: Mon, 15 Jan 2024 18:11:56 +0330 Subject: [PATCH] fix: use CKEditor5 for post's credit field --- src/api/post/content-types/post/schema.json | 7 ++++++- types/generated/contentTypes.d.ts | 9 ++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/api/post/content-types/post/schema.json b/src/api/post/content-types/post/schema.json index f81bd6a..93516bf 100644 --- a/src/api/post/content-types/post/schema.json +++ b/src/api/post/content-types/post/schema.json @@ -79,7 +79,12 @@ "component": "cat.channel" }, "credits": { - "type": "richtext" + "type": "customField", + "options": { + "output": "HTML", + "preset": "standard" + }, + "customField": "plugin::ckeditor.CKEditor" } } } diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index 505c9be..a499822 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -898,7 +898,14 @@ export interface ApiPostPost extends Schema.CollectionType { cover_image: Attribute.Media; tags: Attribute.Relation<'api::post.post', 'manyToMany', 'api::tag.tag'>; channel: Attribute.Component<'cat.channel', true>; - credits: Attribute.RichText; + credits: Attribute.RichText & + Attribute.CustomField< + 'plugin::ckeditor.CKEditor', + { + output: 'HTML'; + preset: 'standard'; + } + >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; publishedAt: Attribute.DateTime;