From 856178626375a3b3a9ee30b425286962af9aabc1 Mon Sep 17 00:00:00 2001 From: Steve Lambe Date: Fri, 4 Dec 2015 22:02:48 -0500 Subject: [PATCH] Updated readme and added the core options I plan on using personally. --- README.md | 14 ++++++++------ editor.jsx | 7 ++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 16e816a..655f68d 100644 --- a/README.md +++ b/README.md @@ -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 . 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: @@ -88,3 +89,4 @@ Component = React.createClass({ } ``` +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. diff --git a/editor.jsx b/editor.jsx index 22da74e..d13706e 100644 --- a/editor.jsx +++ b/editor.jsx @@ -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); },