Summary field remove 'inline image' and 'keyboard input' options (#38012)
* Summary field remove 'inline image' and 'keyboard input' options * Add changelog file
This commit is contained in:
parent
bf14b26846
commit
f3959d0700
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: add
|
||||
|
||||
Summary field remove 'inline image' and 'keyboard input' options#37986
|
|
@ -11,6 +11,21 @@
|
|||
"align": {
|
||||
"type": "string"
|
||||
},
|
||||
"allowedFormats": {
|
||||
"type": "array",
|
||||
"default": [
|
||||
"core/bold",
|
||||
"core/code",
|
||||
"core/italic",
|
||||
"core/link",
|
||||
"core/strikethrough",
|
||||
"core/underline",
|
||||
"core/text-color",
|
||||
"core/subscript",
|
||||
"core/superscript",
|
||||
"core/unknown"
|
||||
]
|
||||
},
|
||||
"direction": {
|
||||
"type": "string",
|
||||
"enum": [ "ltr", "rtl" ]
|
||||
|
|
|
@ -28,7 +28,7 @@ export function Edit( {
|
|||
attributes,
|
||||
setAttributes,
|
||||
}: BlockEditProps< SummaryAttributes > ) {
|
||||
const { align, direction, label } = attributes;
|
||||
const { align, allowedFormats, direction, label } = attributes;
|
||||
const blockProps = useBlockProps( {
|
||||
style: { direction },
|
||||
} );
|
||||
|
@ -83,6 +83,7 @@ export function Edit( {
|
|||
[ `has-text-align-${ align }` ]: align,
|
||||
} ) }
|
||||
dir={ direction }
|
||||
allowedFormats={ allowedFormats }
|
||||
/>
|
||||
</BaseControl>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
export type SummaryAttributes = {
|
||||
align: 'left' | 'center' | 'right' | 'justify';
|
||||
allowedFormats?: string[];
|
||||
direction: 'ltr' | 'rtl';
|
||||
label: string;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue