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": {
|
"align": {
|
||||||
"type": "string"
|
"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": {
|
"direction": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [ "ltr", "rtl" ]
|
"enum": [ "ltr", "rtl" ]
|
||||||
|
|
|
@ -28,7 +28,7 @@ export function Edit( {
|
||||||
attributes,
|
attributes,
|
||||||
setAttributes,
|
setAttributes,
|
||||||
}: BlockEditProps< SummaryAttributes > ) {
|
}: BlockEditProps< SummaryAttributes > ) {
|
||||||
const { align, direction, label } = attributes;
|
const { align, allowedFormats, direction, label } = attributes;
|
||||||
const blockProps = useBlockProps( {
|
const blockProps = useBlockProps( {
|
||||||
style: { direction },
|
style: { direction },
|
||||||
} );
|
} );
|
||||||
|
@ -83,6 +83,7 @@ export function Edit( {
|
||||||
[ `has-text-align-${ align }` ]: align,
|
[ `has-text-align-${ align }` ]: align,
|
||||||
} ) }
|
} ) }
|
||||||
dir={ direction }
|
dir={ direction }
|
||||||
|
allowedFormats={ allowedFormats }
|
||||||
/>
|
/>
|
||||||
</BaseControl>
|
</BaseControl>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
export type SummaryAttributes = {
|
export type SummaryAttributes = {
|
||||||
align: 'left' | 'center' | 'right' | 'justify';
|
align: 'left' | 'center' | 'right' | 'justify';
|
||||||
|
allowedFormats?: string[];
|
||||||
direction: 'ltr' | 'rtl';
|
direction: 'ltr' | 'rtl';
|
||||||
label: string;
|
label: string;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue