Add settigns for typography

Found them in the settings that WordPress passes to Gutenberg when
editing a page.
This commit is contained in:
jordi fita mas 2024-06-15 04:22:51 +02:00
parent 7e0b57c2e4
commit fbe4728053
1 changed files with 39 additions and 0 deletions

View File

@ -26,6 +26,45 @@ export default function Editor() {
{ css: blockLibraryEditor },
{ css: formatLibraryStyle },
],
__experimentalFeatures: {
typography: {
defaultFontSizes: true,
dropCap: true,
fontSizes: {
default: [
{
name: "Small",
slug: "small",
size: "13px",
},
{
name: "Medium",
slug: "medium",
size: "20px",
},
{
name: "Large",
slug: "large",
size: "36px",
},
{
name: "Extra Large",
slug: "x-large",
size: "42px",
},
],
},
customFontSize: true,
fontStyle: true,
fontWeight: true,
letterSpacing: true,
textAlign: true,
textColumns: false,
textDecoration: true,
textTransform: true,
writingMode: false,
},
},
} }
>
<BlockEditor/>