Enhancement: Use WYSIWYG editor component for multi-line text fields. #209

Closed
opened 2026-10-05 02:33:39 +02:00 by adam · 7 comments
Owner

Sometimes more complex content needs to be stored in a frontmatter field.
This suggestion would allow the editor to use a WYSIWYG editing tool to create multi-line HTML in a field.

There are lots of editors that might work.
Ex. https://ourcodeworld.com/articles/read/1065/top-15-best-rich-text-editor-components-wysiwyg-for-reactjs
Since the space is limited I would recommend something with minimal features or a way to add/remove buttons from the UI as needed.

I would make a new param for string fields editor: true or something like that to opt into the additional feature when needed.

Sometimes more complex content needs to be stored in a frontmatter field. This suggestion would allow the editor to use a WYSIWYG editing tool to create multi-line HTML in a field. There are lots of editors that might work. Ex. https://ourcodeworld.com/articles/read/1065/top-15-best-rich-text-editor-components-wysiwyg-for-reactjs Since the space is limited I would recommend something with minimal features or a way to add/remove buttons from the UI as needed. I would make a new param for string fields `editor: true` or something like that to opt into the additional feature when needed. <!-- github-sync-id:1146613326 -->
adam closed this issue 2026-10-05 02:33:39 +02:00
Author
Owner

What would you like the output of the editor to be? Is it markdown or HTML?

What would you like the output of the editor to be? Is it markdown or HTML? <!-- github-comment-id:1047579059 -->
Author
Owner

I was thinking that HTML would be easiest. Since most editors like this already output HTML, and most site generator systems have methods for parsing, processing, injecting HTML.

There are some that do not have native methods for rendering Markdown to HTML from a variable storing Markdown text.

I was thinking that HTML would be easiest. Since most editors like this already output HTML, and most site generator systems have methods for parsing, processing, injecting HTML. There are some that do not have native methods for rendering Markdown to HTML from a variable storing Markdown text. <!-- github-comment-id:1047959386 -->
Author
Owner

@estruyf I've had some further discussions with editors, and so far it has been unanimous for the output of the WYSIWYG editor to be HTML.

@estruyf I've had some further discussions with editors, and so far it has been unanimous for the output of the WYSIWYG editor to be HTML. <!-- github-comment-id:1061105548 -->
Author
Owner

I am getting close to needing this for a site I am about to hand off to a content editor. Can this be bumped?
I see it as being very useful for multi-line text content in front matter variables.

Thank you!

I am getting close to needing this for a site I am about to hand off to a content editor. Can this be bumped? I see it as being very useful for multi-line text content in front matter variables. Thank you! <!-- github-comment-id:1086943430 -->
Author
Owner

I will put this on the next release.

I will put this on the next release. <!-- github-comment-id:1091399408 -->
Author
Owner

@zivbk1 this is testable in the latest beta. On a string field, you can now set wysiwyg property to true.

@zivbk1 this is testable in the latest beta. On a `string` field, you can now set `wysiwyg` property to `true`. <!-- github-comment-id:1096856567 -->
Author
Owner

This works perfectly. Thank you!

This works perfectly. Thank you! <!-- github-comment-id:1110093287 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#209