From d57faced1680a603900b2c6a901f720afabb6e46 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Mon, 1 Apr 2024 23:14:02 +0100 Subject: [PATCH] feat(endpoint-posts): use markdown editor for content field --- .../includes/post-types/content-field.njk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/endpoint-posts/includes/post-types/content-field.njk b/packages/endpoint-posts/includes/post-types/content-field.njk index 7bc0fcb4b..a678c3a90 100644 --- a/packages/endpoint-posts/includes/post-types/content-field.njk +++ b/packages/endpoint-posts/includes/post-types/content-field.njk @@ -1,7 +1,13 @@ -{{ characterCount({ +{{ textarea({ name: "content", value: properties.content.text or fieldData("content").value, label: __("posts.form.content.label"), optional: not field.required, - errorMessage: fieldData("content").errorMessage + errorMessage: fieldData("content").errorMessage, + field: { + attributes: { + editor: true, + "editor-id": properties.uid + "-content" + } + } }) }} \ No newline at end of file