Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to set custom placeholders in text and headings. #1891

Merged
merged 1 commit into from Jul 14, 2017

Conversation

@mtias
Copy link
Contributor

mtias commented Jul 13, 2017

image

Example: <!-- wp:core/heading { "placeholder": "Enter your name" } -->

@nylen

This comment has been minimized.

Copy link
Member

nylen commented Jul 13, 2017

Given that this lives in post content, how would it be initialized and used? It seems like a better fit for an API to extend existing blocks (a similar task to adding another quote style, for example) than something controlled by post content.

@mtias

This comment has been minimized.

Copy link
Contributor Author

mtias commented Jul 14, 2017

Given that this lives in post content, how would it be initialized and used?

This is to give the ability to have posts like "hello world" with a pre configured template to guide a user, without necessarily requiring plugins to build them. Going into proper page templates it could be something like:

// A core text block
do_block( 'core/text', array( 'placeholder' => 'Fill some text here...' ) );
@aduth

This comment has been minimized.

Copy link
Member

aduth commented Jul 14, 2017

Agree it opens questions about extending block types, or whether we should encourage creating separate block types for these use cases.

But open to trying as a simple approach for pre-populated templates.

@mtias

This comment has been minimized.

Copy link
Contributor Author

mtias commented Jul 14, 2017

It definitely starts to pour over the ability to edit page templates.

@mtias mtias merged commit 2664ad1 into master Jul 14, 2017
3 checks passed
3 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.01%) to 17.71%
Details
@mtias mtias deleted the add/customize-placeholder branch Jul 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.