Skip to content

Commit

Permalink
Merge pull request #47 from tannermeans/master
Browse files Browse the repository at this point in the history
Allow devs to set an initial value without triggering a change event
  • Loading branch information
securingsincity committed Sep 21, 2015
2 parents fd1748f + 6484aa9 commit 823eae9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,14 @@ module.exports = React.createClass({
this.editor.getSession().setMode('ace/mode/' + this.props.mode);
this.editor.setTheme('ace/theme/' + this.props.theme);
this.editor.setFontSize(this.props.fontSize);
this.editor.on('change', this.onChange);
this.editor.on('paste', this.onPaste);
this.editor.setValue(this.props.value, this.props.cursorStart);
this.editor.renderer.setShowGutter(this.props.showGutter);
this.editor.setOption('maxLines', this.props.maxLines);
this.editor.setOption('readOnly', this.props.readOnly);
this.editor.setOption('highlightActiveLine', this.props.highlightActiveLine);
this.editor.setShowPrintMargin(this.props.setShowPrintMargin);
this.editor.on('change', this.onChange);
this.editor.on('paste', this.onPaste);

if (this.props.onLoad) {
this.props.onLoad(this.editor);
Expand Down

0 comments on commit 823eae9

Please sign in to comment.