Creating template with h3 block (block editor)

Question

I’m trying to register a custom post type with a template containing a preformated h2 and h3. When I add a core/heading block, it automatically create a H2. What parameter should I add in order to have a H3?

My code looks like this:

register_post_type('custom-post', array(
  // [...]
  'template' => array(
    array(
      'core/heading',
       array(
         'placeholder' => 'this is a H2'
       )
    ),
    array(
      'core/heading',
      array(
        'heading' => '3', // this does not work
        'placeholder' => 'this should be a H3'
      )
    )
  )
));
0
maxime schoeni 2 years 2020-12-18T02:10:33-05:00 0 Answers 5 views 0

Leave an answer

Browse
Browse