Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit c38b028

Browse files
Gaurav Vaishfacebook-github-bot
authored andcommitted
Updated CSS for DraftEditorPlaceholder to support multiline placeholder
Summary: Updated CSS to show a line break in case the placeholder text contains a newline. Reviewed By: sophiebits Differential Revision: D6361301 fbshipit-source-id: 8db9baeac60321835b23cda392555e1bf03bdfd0
1 parent d16833b commit c38b028

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/component/base/DraftEditorPlaceholder.react.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,16 @@ class DraftEditorPlaceholder extends React.Component<Props> {
5050
'public/DraftEditorPlaceholder/hasFocus': hasFocus,
5151
});
5252

53+
const contentStyle = {
54+
whiteSpace: 'pre-wrap',
55+
};
56+
5357
return (
5458
<div className={className}>
5559
<div
5660
className={cx('public/DraftEditorPlaceholder/inner')}
57-
id={this.props.accessibilityID}>
61+
id={this.props.accessibilityID}
62+
style={contentStyle}>
5863
{this.props.text}
5964
</div>
6065
</div>

0 commit comments

Comments
 (0)