установил ckeditor5
сделал плагин
import Vue from 'vue'
import CKEditor from '@ckeditor/ckeditor5-vue2'
Vue.use(CKEditor)
подключил плагин
plugins: [
{ src: '~/plugins/vue-ckeditor.js', mode: 'client' },
],
на страницу вывожу редактор
<ckeditor
:editor="editor"
v-model="editorData"
:config="editorConfig"
></ckeditor>
<script lang="ts">
import Vue from 'vue'
import ClassicEditor from '@ckeditor/ckeditor5-build-classic'
import '@ckeditor/ckeditor5-build-classic/build/translations/ru'
export default Vue.extend({
data() {
return {
editor: ClassicEditor,
editorData: '<p>Содержимое</p>',
editorConfig: {
language: 'ru',
ckfinder: {
uploadUrl:
'/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files&responseType=json',
},
toolbar: [
'ckfinder',
'|',
'heading',
'|',
'bulletedList',
'|',
'numberedList',
'|',
'blockQuote',
'|',
'bold',
'|',
'italic',
'|',
'undo',
'redo',
'insertTable',
],
},
}
},
})
</script>
при обновлении страницы выдает
window is not defined