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

Commit

Permalink
Clarifies editor example, changes height to min-height (#1889)
Browse files Browse the repository at this point in the history
Summary:
**Summary**

Clarifies editor example, explaining how to use CSS selectors from the Draft.css stylesheet, changes `height` to `min-height` in example.

**Test Plan**

Tests on CodeSandbox: https://codesandbox.io/s/9y5162ryj4
Pull Request resolved: #1889

Differential Revision: D10207706

fbshipit-source-id: cf3a6eb659f486ec9a0d6e64018478b113c20922
  • Loading branch information
Claudio Procida authored and facebook-github-bot committed Oct 4, 2018
1 parent b8862fd commit 67d6fda
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class MyEditor extends React.Component {
const styles = {
editor: {
border: '1px solid gray',
height: '6em'
minHeight: '6em'
}
};

Expand All @@ -89,6 +89,8 @@ ReactDOM.render(
);
```

Note that the editor itself is only as tall as its contents. In order to give users a visual cue, we recommend setting a border and a minimum height via the `.DraftEditor-root` CSS selector, or using a wrapper div like in the above example.

Because Draft.js supports unicode, you must have the following meta tag in the `<head>` `</head>` block of your HTML file:

```html
Expand Down

0 comments on commit 67d6fda

Please sign in to comment.