<template>
<div>
<ejs-richtexteditor ref="rteObj":toolbarSettings="toolbarSettings" :focus="onFocus" :blur="onBlur">
</ejs-richtexteditor>
</div>
</template>
<script>
import Vue from "vue";
import { RichTextEditorPlugin, Toolbar, Link, Image, Count, HtmlEditor, QuickToolbar, Table } from "@syncfusion/ej2-vue-richtexteditor";
Vue.use(RichTextEditorPlugin);
export default Vue.extend({
data: function() {
return {
toolbarSettings: {
enable: false,
enableFloating: false,
type: "MultiRow"
}
};
},
methods: {
onBlur: function(e) {
this.$refs.rteObj.ej2Instances.toolbarSettings.enable = false;
},
onFocus: function(e) {
this.$refs.rteObj.ej2Instances.toolbarSettings.enable = true;
}
},
provide: {
richtexteditor: [ Toolbar, Link, Image, Count, HtmlEditor, QuickToolbar, Table ]
}
});
</script>
|