Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow simple markdown in label and description #1288

Open
tordans opened this issue Sep 1, 2024 · 2 comments
Open

Allow simple markdown in label and description #1288

tordans opened this issue Sep 1, 2024 · 2 comments

Comments

@tordans
Copy link
Contributor

tordans commented Sep 1, 2024

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
Copy link
Member

emmatown commented Sep 5, 2024

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

@emmatown emmatown closed this as completed Sep 5, 2024
@tordans
Copy link
Contributor Author

tordans commented Sep 6, 2024

@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,
      },
    ),
  },

@emmatown emmatown reopened this Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants