Skip to content
This repository has been archived by the owner on Aug 7, 2018. It is now read-only.

Commit

Permalink
Updated readme and added the core options I plan on using personally.
Browse files Browse the repository at this point in the history
  • Loading branch information
firrae committed Dec 5, 2015
1 parent fa1fd32 commit 8561786
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
MediumEditor wrapped up in a ReactJS component.

This will create a MediumEditor based on the [mediumeditor:mediumeditor](https://github.com/yabwe/medium-editor) package wherever you use <MediumEditorComp />. The component recieves a set of different options including:
* Toolbar
* Anchor
* Placeholder
* Anchor Form
* Paste
* KeyboardCommands
* Toolbar - toolbar
* Anchor - anchor
* Anchor Preview - anchorPreview
* Placeholder - placeholder
* Anchor Form - anchorForm
* Paste - paste
* KeyboardCommands - keyboardCommands

##Toolbar
The component will take in all the same options that the standard editor will under the toolbar object, simply pass an object containing the settings you want and it'll be passed to the editor. For example:
Expand Down Expand Up @@ -88,3 +89,4 @@ Component = React.createClass({
</div>
}
```
Each of the named options at the top act the same way and offer the options [here](https://github.com/yabwe/medium-editor/blob/master/OPTIONS.md). If you notice something not working feel free to submit an issue or pull request and I'll get to it when I can.
7 changes: 6 additions & 1 deletion editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ MediumEditorComp = React.createClass({
componentDidMount() {
let editor = new MediumEditor('.editable', {
toolbar: this.props.toolbar,
anchor: this.props.anchor
anchor: this.props.anchor,
anchorPreview: this.props.anchorPreview,
placeholder: this.props.placeholder,
anchorForm: this.props.anchorForm,
paste: this.props.paste,
keyboardCommands: this.props.keyboardCommands
});
console.log(editor);
},
Expand Down

0 comments on commit 8561786

Please sign in to comment.