How can I access core/paragraph textColor in a block template

Question

I am trying to set the default textColor of an Innerblocks => paragraph in my Gutenberg block plugin.

The problem seems to be that placeholder is an attribute but textColor is passed as a prop https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/paragraph/edit.js

Wondering if anyone has figured out how to set this. Or if it is not possible.

The documentation does not seem to cover this https://developer.wordpress.org/block-editor/developers/block-api/block-templates/

<InnerBlocks
  template={[
    ["core/paragraph", { placeholder: "Enter side content...", textColor: '#EF4A23' }]
  ]}
/>
0
Andrew 8 months 2020-11-30T14:10:47-05:00 0 Answers 9 views 0

Leave an answer

Browse
Browse