Skip to content
Compare
Choose a tag to compare
@github-actions github-actions released this 11 Jan 21:32
· 116 commits to canary since this release
5bad238

Minor Changes

  • 8dcda28: Add support for RichText control fields.

    Add a source and selector in your block attributes string field:

    ...
    "attributes": {
    		"richText": {
    			"type": "string",
    			"source": "html",
    			"selector": ".rich-text",
    			"default": "Hello World"
    		}
    	}

    Then in your component definition make sure the selector specifier matches the component you want to render as rich text:

    <div
      style={styles}
      className="rich-text"
      dangerouslySetInnerHTML={{ __html: attributes.richText }}
    />

    Once the blocks are synced you will be able to use it as a RichText field.

Patch Changes