decaporg / decaporg/decap-cms

Types missing in `CmsConfig` for new rich text widget field

Open
#7,797 0 comments 0 reactions 0 assignees View on GitHub
area: extensions/widgets/richtext type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**
When using `decap-cms-app`, the configuration types don’t include types for the new `richtext` widget.

**To Reproduce**
For example, the following code produces a type error:
```js
import CMS from 'decap-cms-app';

CMS.init({
config: {
backend: { name: 'github' },
collections: [
{
name: 'example',
label: 'Example',
fields: [{ name: 'body', label: 'Content', widget: 'richtext' }],
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Type '{ name: string; label: string; widget: string; }' is not assignable to type 'CmsField'.
// Type '{ name: string; label: string; widget: string; }' is not assignable to type 'CmsFieldBase & CmsFieldMeta'.
// Type '{ name: string; label: string; widget: string; }' is missing the following properties from type 'CmsFieldMeta': required, index_file, metats(2322)
},
],
},
});
```

**Expected behavior**
Setting `widget: 'richtext'` should not produce a type error

**Applicable Versions:**

- Decap CMS version: `"decap-cms-app": "^3.12.2"`
- OS: macOS
- Node.JS version: 24.15

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.