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

Commit 67d6fda

Browse files
Claudio Procidafacebook-github-bot
authored andcommitted
Clarifies editor example, changes height to min-height (#1889)
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
1 parent b8862fd commit 67d6fda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class MyEditor extends React.Component {
7979
const styles = {
8080
editor: {
8181
border: '1px solid gray',
82-
height: '6em'
82+
minHeight: '6em'
8383
}
8484
};
8585

@@ -89,6 +89,8 @@ ReactDOM.render(
8989
);
9090
```
9191

92+
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.
93+
9294
Because Draft.js supports unicode, you must have the following meta tag in the `<head>` `</head>` block of your HTML file:
9395

9496
```html

0 commit comments

Comments
 (0)