const RichTextBlock: Block = {
slug : 'RichText', // required
imageURL : 'https://google.com/path/to/image.jpg',
imageAltText: 'A nice thumbnail image to show what this block looks like',
fields : [ // required
{
name : 'content', // required
type : 'richText', // required
defaultValue: [{
children: [{text: 'Here is some default content for this field'}],
}],
required : true,
admin : {
elements : [
'h2',
'h3',
'h4',
'link',
'upload',
],
leaves : [
"bold",
"italic",
"underline",
"strikethrough",
"code",
],
hideGutter: true,
upload : {
collections: {
media: {
fields: [{
name : 'alt',
label : 'Alt text',
type : 'text',
minLength: 25,
maxLength: 255,
required : true,
},],
},
},
},
}
}
]
};
export default RichTextBlock;
The alt field does not even show when adding media. Only if you click edit.
Bug Report
Consider the following block:
import type {Block} from 'payload/types';
Expected Behavior
the
altfield should be requiredCurrent Behavior
The alt field does not even show when adding media. Only if you click edit.