New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ckEditor events in vue-ckeditor #83
Comments
Hi @oskarbet From <template>
<div>
<vue-ckeditor
v-model="page.body.ru"
:config="ckEditorOptions"
@dialogDefinition="onDialogDefinition($event)" />
</div>
</template>
<script>
import VueCkeditor from 'vue-ckeditor2';
export default {
components: { VueCkeditor },
data() {
return {
ckEditorOptions: {
toolbar: [
['Bold', 'Image']
],
extraPlugins: ['filebrowser', 'image2'],
filebrowserImageBrowseUrl: 'javascript:void(0)'
},
page: {
body: {
ru: '',
uk: ''
}
}
};
},
methods: {
onDialogDefinition(evt) {
if (evt.data && evt.data.name) {
var dialogName = evt.data.name;
if (dialogName === 'image') {
// Custom loader
}
}
}
}
};
</script> Besides you can use others Ckeditor events such as |
Don't work. DialogDefinition event didn't fired when I have open dialog window. |
Can you send example where event dialogDefinition was fired? |
Hi @oskarbet This is my fault. I registered wrong for It reference from documents of Ckeditor about dialogDefinition |
Great! Thank you! |
In js :
How I can add this event handler to VueCkeditor? In Vue component I have next:
And I want to add custom file uploader when dialogName = 'image'
The text was updated successfully, but these errors were encountered: