【问题标题】:Implementing CKeditor upload adapter CKfinder in Vue在Vue中实现CKeditor上传适配器CKfinder
【发布时间】: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


    【解决方案1】:

    您可以安装 CKeditor。下载地址:https://ckeditor.com/ckfinder/download/

    他们也有一个 Laravel 包:https://github.com/ckfinder/ckfinder-laravel-package

    【讨论】:

    • 这个答案没有帮助,也没有解决 OP 的问题。
    猜你喜欢
    • 1970-01-01
    • 2019-09-15
    • 1970-01-01
    • 2016-02-23
    • 1970-01-01
    • 1970-01-01
    • 2019-04-09
    • 2019-12-17
    • 2018-05-12
    相关资源
    最近更新 更多