Thinkmill / keystatic

First class CMS experience, TypeScript API, Markdown & YAML/JSON based, no DB
https://keystatic.com
MIT License
1.14k stars 75 forks source link

Allow simple markdown in `label` and `description` #1288

Open tordans opened 2 weeks ago

tordans commented 2 weeks ago

I have a few use cases where I would like to add text formatted as inline code to a label or description property. Also adding lists would be something that I see happening.

Would it be possible to parse those texts with a very simple markdown parser?


Sorry, this belongs into the Ideas section. Feel free to move it there.

emmatown commented 1 week ago

This is possible with fields.markdoc.inline/fields.mdx.inline and disabling whatever editor features you don't want to expose

tordans commented 1 week ago

@emmatown I think we are talking about different things here. I am referring to the label and description properties of a keystatic fields object which are rendered to the CMS UI.

Eg…

  schema: {
    results: fields.array(
      fields.object({ /* … */ }),
      {
        label: 'Results',
        description: 'Check out `docs/README.md` to learn more on something.',
        // or even
        // description: 'Check out [`docs/README.md`](https://github/somewhere/docs/README.md) to learn more on something.',
        itemLabel: (props) => props.fields.questionLabel.value,
      },
    ),
  },