【发布时间】:2019-02-07 01:45:02
【问题描述】:
我尝试将 Quill Emojis 添加到编辑器,但出现控制台错误
Uncaught ReferenceError: Quill is not defined
我正在使用 Laravel 5.6 和 vue js,而且对 vue 及其组件肯定是新手,所以我可能听起来很傻,但在过去的 3 天里,我在 google 上搜索解决方案,甚至在 github 上联系了 vue2editor 的作者是the link
这是我迄今为止尝试过的:
vue2editor.vue
<template>
<div id="app">
<vue-editor v-model="content"></vue-editor>
</div>
</template>
<script>
import { VueEditor, Quill } from 'vue2-editor';
import Emoji from 'quill-emoji/dist/quill-emoji';
Quill.register('modules/quill-emoji', Emoji);
export default {
name: 'vue2editor',
components: { VueEditor },
data() {
return {
content: "<h1>Some initial content</h1>",
editorSettings: {
modules: {
toolbar: {
container: [
[{'size': ['small', false, 'large']}],
['bold', 'italic', 'underline', 'strike'],
['blockquote', 'code-block'],
[{ 'header': 1 }, { 'header': 2 }],
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
[{ 'script': 'sub' }, { 'script': 'super' }],
[{ 'indent': '-1' }, { 'indent': '+1' }],
[{ 'direction': 'rtl' }],
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
[{ 'color': [] }, { 'background': [] }],
[{ 'font': [] }],
[{ 'align': [] }],
['clean'],
['link', 'image', 'video'],
['emoji'],
],
handlers: {
'emoji': function () {}
},
},
toolbar_emoji: true,
short_name_emoji: true,
textarea_emoji:true,
},
},
text: null,
};
},
};
</script>
我什至尝试了 github 上一位用户提到的 Quill-Emoji 方法,这里是 link。
我满怀希望来到这里;如果这里有人要帮助我,至少告诉我我缺少什么对我来说不仅仅是帮助。
【问题讨论】:
-
没有人有兴趣帮助我吗?
标签: laravel vue.js vuejs2 vue-component laravel-5.6