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

Commit

Permalink
Updated CSS for DraftEditorPlaceholder to support multiline placeholder
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Gaurav Vaish authored and facebook-github-bot committed Nov 20, 2017
1 parent d16833b commit c38b028
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/component/base/DraftEditorPlaceholder.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,16 @@ class DraftEditorPlaceholder extends React.Component<Props> {
'public/DraftEditorPlaceholder/hasFocus': hasFocus,
});

const contentStyle = {
whiteSpace: 'pre-wrap',
};

return (
<div className={className}>
<div
className={cx('public/DraftEditorPlaceholder/inner')}
id={this.props.accessibilityID}>
id={this.props.accessibilityID}
style={contentStyle}>
{this.props.text}
</div>
</div>
Expand Down

0 comments on commit c38b028

Please sign in to comment.