Skip to content

Feature request: Implement registerFieldType / registerWidget API #709

@jonasbeck

Description

@jonasbeck

Use case

We're evaluating migrating from Decap CMS to Sveltia CMS for a production Astro site. The project relies on two custom Decap widgets registered via CMS.registerWidget():

  1. Image settings widget — A focal point picker with sliders for brightness, contrast, gamma, saturation, sharpen, and zoom. Stores a compound gravity string used with Cloudflare Image Transformations for responsive cropping.

  2. Video widget — A video file selector that renders a preview with controls and metadata, integrated with the media library.

These widgets are essential to our editorial workflow — editors use the focal point picker on every image to control how it crops across breakpoints. Without registerFieldType, migrating is blocked despite the rest of the API surface (editor components, preview styles, event hooks, native R2 media support) being a great fit.

Context

The docs page documents the planned API signature (registerFieldType(name, control, [preview], [schema])) and notes it's "unimplemented — will be added soon." The roadmap mentions custom field types under the v1.0 enhanced compatibility goal, but there's no tracked issue for this specific feature.

Our existing widgets use React class components via createClass + h (the same pattern Decap exposes), so they should be directly portable once the API is implemented.

Current workaround

None — we remain on Decap CMS. The custom R2 media library we built is replaceable by Sveltia's native Cloudflare R2 integration, but custom field types have no alternative.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions