mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-07 02:11:25 +02:00
#197 - Update fields type + support for taxonomy and images
This commit is contained in:
@@ -140,7 +140,7 @@ export class ContentType {
|
||||
if (field.name === "title") {
|
||||
data[field.name] = titleValue;
|
||||
} else {
|
||||
if (field.type === "object") {
|
||||
if (field.type === "fields") {
|
||||
data[field.name] = this.processFields(field, titleValue, {});
|
||||
} else {
|
||||
data[field.name] = field.default || "";
|
||||
|
||||
@@ -295,7 +295,7 @@ export class MediaHelpers {
|
||||
panel.getMediaSelection();
|
||||
} else {
|
||||
panel.getMediaSelection();
|
||||
panel.updateMetadata({field: data.fieldName, value: data.image });
|
||||
panel.updateMetadata({field: data.fieldName, value: data.image, parents: data.parents });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user