diff --git a/README.md b/README.md index 3b53615..3b4f41c 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ export default RichTextEditor; | onKeyUp | `Function` | `e.keyCode` is released | | onPaste | `Function` | Triggers when event paste's been called | | onChange | `Function` | handler: `function(contents, $editable) {}`, invoked, when content's been changed | +| onChangeCodeView | `Function` | handler: `function(contents) {}`, invoked, when content's been changed in codeview | | onImageUpload | `Function` | handler: `function(files) {}` | ### Static methods diff --git a/src/Summernote.jsx b/src/Summernote.jsx index cada868..49c56a8 100644 --- a/src/Summernote.jsx +++ b/src/Summernote.jsx @@ -188,7 +188,8 @@ class ReactSummernote extends Component { onKeydown: props.onKeyDown, onPaste: props.onPaste, onChange: props.onChange, - onImageUpload: this.onImageUpload + onImageUpload: this.onImageUpload, + onChangeCodeview: props.onChangeCodeview }; } @@ -218,7 +219,8 @@ ReactSummernote.propTypes = { onKeyDown: PropTypes.func, onPaste: PropTypes.func, onChange: PropTypes.func, - onImageUpload: PropTypes.func + onImageUpload: PropTypes.func, + onChangeCodeview: PropTypes.func }; ReactSummernote.defaultProps = {