Slate: Editor component's placeholder prop is broken

Created on 10 May 2019  路  2Comments  路  Source: ianstormtaylor/slate

Do you want to request a _feature_ or report a _bug_?

馃悰

What's the current behavior?

When the Editor component from slate-react has the placeholder prop specified, the expected behavior is that the placeholder text will be rendered when there is no text entered. The current behavior is that the placeholder text is not being rendered in the latest slate-react.

This bug is verifiable in Slate's own examples, e.g. https://www.slatejs.org/#/rich-text where the source code specifies a placeholder prop, the empty state for the editor does not render the placeholder.

Screen Shot 2019-05-10 at 2 18 44 PM

What's the expected behavior?

The expected behavior is that the placeholder text is visible in the empty state. I am completely new to slate though so it's possible I'm misunderstanding what this is supposed to do.

Most helpful comment

Thanks @franjohn21, I totally missed that one!

All 2 comments

馃憢 @ianstormtaylor think we could get some eyes on https://github.com/ianstormtaylor/slate/pull/2765 when you get a chance? IMO the placeholder is fairly critical to maintain feature parity with native text inputs

Thanks @franjohn21, I totally missed that one!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YurkaninRyan picture YurkaninRyan  路  3Comments

JSH3R0 picture JSH3R0  路  3Comments

ezakto picture ezakto  路  3Comments

gorillatron picture gorillatron  路  3Comments

chrpeter picture chrpeter  路  3Comments