Enhancement: Add multiline string field support in data view #290

Closed
opened 2026-10-05 02:38:09 +02:00 by adam · 10 comments
Owner

I would expect the Dashboard > Data view to work according to the docs for field configurations for strings, as in single: false and wysiwyg: true resulting in extended text fields. It doesn't though.

Config:

  "frontMatter.data.files": [
    {
      "id": "music2program2",
      "title": "Music to program to",
      "file": "[[workspace]]/data/dnb/kollitsch/music.json",
      "fileType": "json",
      "labelField": "name",
      "schema": {
        "title": "music2program2",
        "type": "object",
        "required": [
          "name",
          "link"
        ],
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "link": {
            "type": "string",
            "title": "URL"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "single": false,
            "wysiwyg": true
          }
        }
      }
    }
  ],

results in:

20220627-22:20:15-Selection-001

It would be nice to have at least a multiline field here. Maybe even globally some form of distinction between string and "multiline string" as field type in general?

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
I would expect the Dashboard > Data view to work according to [the docs for field configurations for strings](https://frontmatter.codes/docs/content-creation/fields#string), as in `single: false` and `wysiwyg: true` resulting in extended text fields. It doesn't though. Config: ``` "frontMatter.data.files": [ { "id": "music2program2", "title": "Music to program to", "file": "[[workspace]]/data/dnb/kollitsch/music.json", "fileType": "json", "labelField": "name", "schema": { "title": "music2program2", "type": "object", "required": [ "name", "link" ], "properties": { "name": { "type": "string", "title": "Name" }, "link": { "type": "string", "title": "URL" }, "description": { "type": "string", "title": "Description", "single": false, "wysiwyg": true } } } } ], ``` results in: ![20220627-22:20:15-Selection-001](https://user-images.githubusercontent.com/83281/175975613-ffbe1dcb-0040-4af2-b191-d3581ae66e52.png) It would be nice to have at least a multiline field here. Maybe even globally some form of distinction between string and "multiline string" as field type in general? **Desktop (please complete the following information):** - OS: Ubuntu 22.04 <!-- github-sync-id:1285967820 -->
adam closed this issue 2026-10-05 02:38:09 +02:00
Author
Owner

also sidenote: "your $title data items" will probably result in weird displays sometimes. Because the left column is always visible it would be nice to just have "data items" or even "items" as column title here and "Create or modify data" in the third column. The second column could be wider, the first one smaller.

also sidenote: "your $title data items" will probably result in weird displays sometimes. Because the left column is always visible it would be nice to just have "data items" or even "items" as column title here and "Create or modify data" in the third column. The second column could be wider, the first one smaller. <!-- github-comment-id:1167506385 -->
Author
Owner

@davidsneighbour single and wysiwyg are not supported. The files are automatically rendered by the JSON schema and do not follow the same logic as the other content fields (yet). I'm going to tag this as an enhancement.

@davidsneighbour `single` and `wysiwyg` are not supported. The files are automatically rendered by the JSON schema and do not follow the same logic as the other content fields (yet). I'm going to tag this as an enhancement. <!-- github-comment-id:1168256747 -->
Author
Owner

Ping :)

I just worked on my data file configuration and was about to open a new issue when I realized that I had already done so a while back.

The issues remain:

  • from the view, there is no need to have "your $title data items" (it takes too much space and is understood from the left column). "Select your data type", "Items", and "Create or Modify data" would result in a single header line instead of 1 to 3 in the screenshot below.
  • a multiline field would be really nice ;) my description in this specific case is a markdown text that might be long.

new idea ;):

  • validation. the slug field here should not have spaces or special characters, so it would be nice to maybe have some form of a regular expression to match the content of each field against.

20230313-21:50:06-Selection-001

This still stays enhancement, so there is no pressure :) but I got ideas for the data functionality. Think recipes or "trading card games". I think it might be a powerful feature for data file enabled SSGs.

Ping :) I just worked on my data file configuration and was about to open a new issue when I realized that I had already done so a while back. The issues remain: - from the view, there is no need to have "your $title data items" (it takes too much space and is understood from the left column). "Select your data type", "Items", and "Create or Modify data" would result in a single header line instead of 1 to 3 in the screenshot below. - a multiline field would be really nice ;) my description in this specific case is a markdown text that might be long. new idea ;): - validation. the slug field here should not have spaces or special characters, so it would be nice to maybe have some form of a regular expression to match the content of each field against. ![20230313-21:50:06-Selection-001](https://user-images.githubusercontent.com/83281/224738425-685c1d26-f97f-490f-ab59-bb631911f2ea.png) This still stays enhancement, so there is no pressure :) but I got ideas for the data functionality. Think recipes or "trading card games". I think it might be a powerful feature for data file enabled SSGs. <!-- github-comment-id:1466312227 -->
Author
Owner

I have a strong need for multiline fields as well (also using markdown in those fields).

I have a strong need for multiline fields as well (also using markdown in those fields). <!-- github-comment-id:1466813942 -->
Author
Owner

I heard both of you 😀

image

To support this, I must add a new property for the long text (textarea) field.

{
  "name": {
    "type": "string",
    "title": "Name"
  },
  "url": {
    "type": "string",
    "title": "URL"
  },
  "description": {
    "type": "string",
    "longtext": true,
    "title": "Description"
  }
}

Above I used longtext (as that is the field to load in uniforms, but if you have a better suggestion, let me know.

I heard both of you 😀 ![image](https://user-images.githubusercontent.com/2900833/224819676-b428a355-1bd1-4dad-a3bd-e295238d527d.png) To support this, I must add a new property for the long text (textarea) field. ```json { "name": { "type": "string", "title": "Name" }, "url": { "type": "string", "title": "URL" }, "description": { "type": "string", "longtext": true, "title": "Description" } } ``` Above I used `longtext` (as that is the field to load in uniforms, but if you have a better suggestion, let me know. <!-- github-comment-id:1466883067 -->
Author
Owner

That's fine! As long as it's documented, I can work with it (multiline might be a more intuitive key name but I'm not too fussed about it).

That's fine! As long as it's documented, I can work with it (`multiline` might be a more intuitive key name but I'm not too fussed about it). <!-- github-comment-id:1467048140 -->
Author
Owner

and so it became multiline.

@davidsneighbour @michaeltlombardi you can configure it as follows:

{
  "name": {
    "type": "string",
    "title": "Name"
  },
  "url": {
    "type": "string",
    "title": "URL"
  },
  "description": {
    "type": "string",
    "multiline": true, // Set the multiline support
    "title": "Description"
  }
}
and so it became `multiline`. @davidsneighbour @michaeltlombardi you can configure it as follows: ```json { "name": { "type": "string", "title": "Name" }, "url": { "type": "string", "title": "URL" }, "description": { "type": "string", "multiline": true, // Set the multiline support "title": "Description" } } ``` <!-- github-comment-id:1467552087 -->
Author
Owner

The label of the field is not bold like on the other fields. All else is as I dreamed of :)

20230314-23:01:40-Selection-001

The label of the field is not bold like on the other fields. All else is as I dreamed of :) ![20230314-23:01:40-Selection-001](https://user-images.githubusercontent.com/83281/225064544-85acf53e-acbd-43cb-b40d-ccb8dfce3942.png) <!-- github-comment-id:1468383311 -->
Author
Owner

Good catch, just rendering the OOTB experience, didn't notice it, will fix it.

Good catch, just rendering the OOTB experience, didn't notice it, will fix it. <!-- github-comment-id:1468398792 -->
Author
Owner

Just released a fix for this @davidsneighbour

Just released a fix for this @davidsneighbour <!-- github-comment-id:1468417654 -->
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#290