DEV Community

tanakaworld
tanakaworld

Posted on

How to customize the Notification in CKEditor

Premises

Customize it via extraPlugins

According to documentation, you can customize notification's behavior like this.

<template>
  <ckeditor :config="editorConfig" />
</template>

<script lang="ts">
import Vue from 'vue';
import CKEditor from '@ckeditor/ckeditor5-vue';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';


export default Vue.extend({
  components: {
    ckeditor: CKEditor.component,
  },
  data() {
    return {
      editorConfig: {
        extraPlugins: [
          editor => {
           const notifications = editor.plugins.get('Notification');
           notifications.on('show:warning', (evt, _data) => {
             evt.stop();
           });
          };
        ],
      },
    };
  },
});
</script>

Top comments (0)