Skip to content
This repository was archived by the owner on Apr 6, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 :

Expand All @@ -249,6 +250,7 @@ Example :
@blur="onEditorBlur"
@change="onEditorChange"
@stateChange="onEditorStateChange"
@paste="onEditorPaste"
/>
</template>
<script>
Expand All @@ -274,6 +276,9 @@ export default {
onEditorStateChange() {
// implement your code
},
onEditorPaste() {
// implement your code
},
}
};
</script>
Expand Down Expand Up @@ -428,6 +433,7 @@ Example :
@blur="onEditorBlur"
@change="onEditorChange"
@stateChange="onEditorStateChange"
@paste="onEditorPaste"
/>
</template>

Expand All @@ -454,6 +460,9 @@ export default {
onEditorStateChange() {
// implement your code
},
onEditorPaste() {
// implement your code
},
}
};
```
Expand Down
3 changes: 2 additions & 1 deletion src/editorEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ export default [
'change',
'stateChange',
'focus',
'blur'
'blur',
'paste'
];
5 changes: 3 additions & 2 deletions stories/editor.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ stories.add('Event', () => ({
Editor
},
template: html`
<editor @load="onLoad" @focus="onFocus" @blur="onBlur" @change="onChange" @stateChange="onStateChange" />`,
<editor @load="onLoad" @focus="onFocus" @blur="onBlur" @change="onChange" @stateChange="onStateChange" @paste="onPaste" />`,
methods: {
onLoad: action('onLoad'),
onFocus: action('onFocus'),
onBlur: action('onBlur'),
onChange: action('onChange'),
onStateChange: action('onStateChange')
onStateChange: action('onStateChange'),
onPaste: action('onPaste')
}
}));

Expand Down