【发布时间】:2019-04-02 09:34:39
【问题描述】:
我已经阅读了有关使用上传适配器 CKfinder 实现 CKeditor 的文档和数十个 stackoverflow 主题。但是没有一个在 vue 中。仅关于 CKeditor,但与 CKfinder 无关。文档对我来说太不清楚了,我也读过其他一些抱怨它的话题。所以我希望这里有人可以帮助我理解这是如何工作的。
这就是我现在拥有的:
<template>
<section class="j-input-text-editor row">
<label v-if="label" :class="label_class">
{{label}}
</label>
<div :class="input_class">
<ckeditor ref="editor" :editor="editor" v-model="mValue" @input="updateValue"></ckeditor>
</div>
</section>
</template>
<script>
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
export default {
name: "textEditor",
data() {
return {
mValue: '',
editorData: '<p>Content of the editor.</p>',
editor: ClassicEditor,
}
},
created() {
ClassicEditor
.create( this.$refs.editor, {
ckfinder: {
uploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files&responseType=json' // here you can set your own file path
}
} )
.then(console.log('yeay'))
.catch(console.log('error'));
},
}
</script>
就像我说的。我完全被困在这一点上,并且在星期五尝试犯罪(周末我显然不必工作)
附:我也在使用laravel,我需要后端的东西吗? P.S.S.我的英语不是最好的,我知道。如果我需要更清楚地解释我的问题是什么,那么我会尽力为您做到这一点。
【问题讨论】:
标签: laravel vuejs2 ckeditor ckfinder