Skip to content

Commit

Permalink
docs(overview): Improve usage docs
Browse files Browse the repository at this point in the history
Closes #299
  • Loading branch information
Andre Gavino committed Feb 10, 2020
1 parent aec850c commit 40ba8c2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import React from "react";
import ReactDOM from "react-dom";
import {MegadraftEditor, editorStateFromRaw} from "megadraft";

//Import megadraft.css
import 'megadraft/dist/css/megadraft.css'

class App extends React.Component {
constructor(props) {
super(props);
Expand All @@ -33,9 +36,13 @@ class App extends React.Component {

render() {
return (
<MegadraftEditor
editorState={this.state.editorState}
onChange={this.onChange}/>
//Add some margin left to show plugins sidebar
<div style={{marginLeft: 80}}>
<MegadraftEditor
editorState={this.state.editorState}
onChange={this.onChange}
placeholder='Add some text'/>
</div>
)
}
}
Expand All @@ -45,10 +52,3 @@ ReactDOM.render(
document.getElementById('container')
);
```

Then link the main css (`dist/css/megadraft.css`) on your page, you can use the
Sass source on your build, if you wish.

```html
<link href="node_modules/megadraft/dist/css/megadraft.css" rel="stylesheet">
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "megadraft",
"version": "0.6.15",
"version": "0.7-alpha.0",
"description": "Rich Text editor built on top of draft.js",
"main": "lib/Megadraft.js",
"dependencies": {
Expand Down

0 comments on commit 40ba8c2

Please sign in to comment.