Skip to content

Documentation for Template Block attributes #6190

Closed

Description

Issue Overview

In the template documentation there is no information what attributes can be used for the different blocks.

'template' => array(
    array( 'core/image', array(
        'align' => 'left',
    ) ),
),

https://wordpress.org/gutenberg/handbook/templates/

Possible Solution

The attributes can be found in the index.js of the the single blocks which can be found in https://github.com/WordPress/gutenberg/blob/master/blocks/library/

The path for the index.js would https://github.com/WordPress/gutenberg/blob/{block-name}/index.js

The current attributes for the paragraph block currently are

const {
    align,
    content,
    dropCap,
    placeholder,
    backgroundColor,
    textColor,
    width,
} = attributes;

which can be found here: https://github.com/WordPress/gutenberg/blob/v2.6.0/blocks/library/paragraph/index.js#L139-L145

Todos

  • Documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Good First IssueAn issue that's suitable for someone looking to contribute for the first timeNeeds DevReady for, and needs developer efforts[Feature] Block DirectoryRelated to the Block Directory, a repository of block plugins[Type] Developer DocumentationDocumentation for developers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions