Add custom widgets to CMS
notramo opened this issue · comments
In any serious site, there are bigger requirements for CMS data types then the _schema.json
file could provide. Component authors might want to write custom CMS widgets for managing data consumed by the component.
E.g. there is a widget that displays an image with art direction settings (what should be in center when cropping):
{
"src": "/assets/image.webp",
"x": 140,
"y": 355
}
This is unintuitive to manage it using numeric fields, no matter what scheme is provided. It should be managed by a widget that displays the image, and lets the user click a pixel on the image to select as center.
Instead of schema JSON, the CMS for a given page should be programmed in JS, with Svelte widgets. Instead of learning a new format (schema JSON), programmers could utilize their existing knowledge.