Please include as much detail as possible so we can help more quickly.
self.options.mapWidgetTypes = {
...self.options.mapWidgetTypes,
'apostrophe-rich-text': '@apostrophecms/rich-text',
'apostrophe-images': async (widget) => ({
...widget,
type: '@apostrophecms/image',
imageFields: widget.relationships,
imageIds: (widget.pieceIds || []).slice(0, 1)
}),
'apostrophe-video': '@apostrophecms/video',
'apostrophe-html': '@apostrophecms/html'
};
Question or comment
Please include as much detail as possible so we can help more quickly.
self.options.mapWidgetTypestakes any user-entered configuration, spreads it, then adds core widget config. This prevents users from overriding the core widget mapping. For image widgets it could be especially useful to be able to identify a different widget type and data structureDetails
Current mapping:
content-upgrader/index.js
Lines 29 to 40 in f405ce4