From a00ce9127dc772d5049d55d51ff302538bbb0801 Mon Sep 17 00:00:00 2001 From: Bisho silwal Date: Sun, 2 Aug 2020 16:47:54 +0545 Subject: [PATCH 1/2] added onChangeCodeView callback --- src/Summernote.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 = { From 566ae8e33cc32d33e46cdfb9f271c780ea0d4dc1 Mon Sep 17 00:00:00 2001 From: Bisho silwal Date: Sun, 2 Aug 2020 16:57:12 +0545 Subject: [PATCH 2/2] readme updated --- README.md | 1 + 1 file changed, 1 insertion(+) 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