Adding it the way you've suggested is not possible, and adding inline style
attributes would be bad practice.
However, what you want is possible by adding CSS classes, e.g.
array( 'core/heading', array(
'level' => 3,
'className' => 'biggerh3',
'placeholder' => 'Bigger Heading Placeholder'
) ),
Then this CSS:
.biggerh3 { font-size: 1.34em; }
Or by adding a custom block that's naturally bigger.
Other solutions include:
CSS selectors! You could use a rule to target the first h3
, e.g.
h3:first-of-type {
font-size: 1.34em;
}
Or the 3rd h3:
h3:nth-child(3) {
font-size: 1.34em;
}
The most gutenberg method would be to use block styles, which would even let you reuse this on other blocks, or change your mind at a later date about how it should be styled without having to go back and change all your posts
h3
as a default block that can be edited but can't be removed? Or that users can add headings but not remove them? Or HTML blocks? It's unclear/ambiguous what you mean, please use the edit link under the question to add clarifications. Focus on what the problem you're trying to solve is, rather than any methods of solving it or broken/incomplete solutionsh3
tag, CSS classes, custom blocks, etc. Keep in mind that post content is theme agnostic, you shouldn't be bundling CSS into blocks like that