|
@@ -11,20 +11,23 @@
|
|
|
Vue-Quill-Editor:基于Quill、适用于Vue2的富文本编辑器。
|
|
Vue-Quill-Editor:基于Quill、适用于Vue2的富文本编辑器。
|
|
|
访问地址:<a href="https://github.com/surmon-china/vue-quill-editor" target="_blank">vue-quill-editor</a>
|
|
访问地址:<a href="https://github.com/surmon-china/vue-quill-editor" target="_blank">vue-quill-editor</a>
|
|
|
</div>
|
|
</div>
|
|
|
- <quill-editor ref="myTextEditor" v-model="content" :config="editorOption"></quill-editor>
|
|
|
|
|
|
|
+ <quill-editor ref="myTextEditor" v-model="content" :options="editorOption"></quill-editor>
|
|
|
<el-button class="editor-btn" type="primary" @click="submit">提交</el-button>
|
|
<el-button class="editor-btn" type="primary" @click="submit">提交</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import 'quill/dist/quill.core.css';
|
|
|
|
|
+ import 'quill/dist/quill.snow.css';
|
|
|
|
|
+ import 'quill/dist/quill.bubble.css';
|
|
|
import { quillEditor } from 'vue-quill-editor';
|
|
import { quillEditor } from 'vue-quill-editor';
|
|
|
export default {
|
|
export default {
|
|
|
data: function(){
|
|
data: function(){
|
|
|
return {
|
|
return {
|
|
|
- content: '<p>Hello BBK</p>',
|
|
|
|
|
|
|
+ content: '',
|
|
|
editorOption: {
|
|
editorOption: {
|
|
|
- // something config
|
|
|
|
|
|
|
+ placeholder: 'Hello World'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -39,11 +42,6 @@
|
|
|
console.log(this.content);
|
|
console.log(this.content);
|
|
|
this.$message.success('提交成功!');
|
|
this.$message.success('提交成功!');
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
- computed: {
|
|
|
|
|
- editor() {
|
|
|
|
|
- return this.$refs.myTextEditor.quillEditor;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|