diff --git a/README.md b/README.md
index e814992..277d2dd 100644
--- a/README.md
+++ b/README.md
@@ -238,6 +238,7 @@ export default {
* stateChange : It would be emitted when format change by cursor position
* focus : It would be emitted when editor get focus
* blur : It would be emitted when editor loose focus
+* paste : It would be emitted when something gets pasted
Example :
@@ -249,6 +250,7 @@ Example :
@blur="onEditorBlur"
@change="onEditorChange"
@stateChange="onEditorStateChange"
+ @paste="onEditorPaste"
/>
@@ -428,6 +433,7 @@ Example :
@blur="onEditorBlur"
@change="onEditorChange"
@stateChange="onEditorStateChange"
+ @paste="onEditorPaste"
/>
@@ -454,6 +460,9 @@ export default {
onEditorStateChange() {
// implement your code
},
+ onEditorPaste() {
+ // implement your code
+ },
}
};
```
diff --git a/src/editorEvents.js b/src/editorEvents.js
index 49f7f5a..9be69dc 100644
--- a/src/editorEvents.js
+++ b/src/editorEvents.js
@@ -3,5 +3,6 @@ export default [
'change',
'stateChange',
'focus',
- 'blur'
+ 'blur',
+ 'paste'
];
diff --git a/stories/editor.stories.js b/stories/editor.stories.js
index 3cb1935..f98dc85 100644
--- a/stories/editor.stories.js
+++ b/stories/editor.stories.js
@@ -53,13 +53,14 @@ stories.add('Event', () => ({
Editor
},
template: html`
- `,
+ `,
methods: {
onLoad: action('onLoad'),
onFocus: action('onFocus'),
onBlur: action('onBlur'),
onChange: action('onChange'),
- onStateChange: action('onStateChange')
+ onStateChange: action('onStateChange'),
+ onPaste: action('onPaste')
}
}));