Skip to content

Commit

Permalink
Uses withoutInteractiveFormatting prop rather than allowedFormats for…
Browse files Browse the repository at this point in the history
… RichText tab titles
  • Loading branch information
creativecoder committed Jul 30, 2024
1 parent 573e59d commit c6e1846
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions packages/block-library/src/tabs/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,6 @@ const TABS_TEMPLATE = [
[ 'core/tab', { label: 'Tab 2' } ],
];

const ALLOWED_FORMATS = [
'core/bold',
'core/code',
'core/image',
'core/italic',
'core/keyboard',
'core/language',
'core/strikethrough',
'core/subscript',
'core/superscript',
'core/text-color',
];

export default function Edit( { clientId, setAttributes } ) {
const { innerTabBlocks, selectedTabClientId } = useSelect(
( select ) => {
Expand Down Expand Up @@ -169,7 +156,6 @@ export default function Edit( { clientId, setAttributes } ) {
tabIndex={ tabIndexAttr }
>
<RichText
allowedFormats={ ALLOWED_FORMATS }
tagName="span"
onChange={ ( value ) =>
updateBlockAttributes( block.clientId, {
Expand All @@ -178,6 +164,7 @@ export default function Edit( { clientId, setAttributes } ) {
}
placeholder={ __( 'Add label…' ) }
value={ label }
withoutInteractiveFormatting
/>
</a>
</li>
Expand Down

0 comments on commit c6e1846

Please sign in to comment.