vue项目中使用ueditor的实例讲解

网友投稿 259 2023-02-14


vue项目中使用ueditor的实例讲解

以vue-cli生成的项目为例

1.static文件夹下先放入ueditor文件

2.index.html添加如下代码

3.webpack.base.conf.js添加如下配置

externals: {

'UE': 'UE',

},

4.index.html中添加

5.editor组件

<script>

const UE = require('UE');// eslint-disable-line

export default {

name: 'editorView',

data: () => (

{

editor: null,

}

),

methods: {

geteditor() {

console.log(this.editor.getContent());

},

},

mounted() {

this.editor = UE.getEditor('editor');

},

destroyed() {

this.editor.destroy();

},

};


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:JAVA验证码工具实例代码
下一篇:详解Spring Cloud 跨服务数据聚合框架
相关文章

 发表评论

暂时没有评论,来抢沙发吧~