Rich Text Ueditor

Official Wiki
Chinese Documentation
Configuration Items Manual
Various masters
add link descriptions

Baidu is not updated and you can choose wangEditor

Summary of VUE project introduction and use steps (VUE usage mode):
1. Download
the official warehouse
of the compressed package 2. Unzip it into the project static directory
insert image description here

3. Enter the project console
npm i vue-ueditor-wrap
4. Take the following code as an example to use


<template>
       <div class='race-content'>
           <vue-ueditor-wrap v-model="write.msg" :config="myConfig" ></vue-ueditor-wrap>
           <el-button @click="submit"> 提交 </el-button>
       </div>
</template>
<script >
import VueUeditorWrap from 'vue-ueditor-wrap' 
export default ({
    
    
    components: {
    
    
        VueUeditorWrap
    },
    props: {
    
    

    },
    data(){
    
    
        return {
    
    
            myConfig: {
    
    
                // 编辑器不自动被内容撑高
                autoHeightEnabled: false,
                // 初始容器高度
                initialFrameHeight: 500,
                // 初始容器宽度
                initialFrameWidth: '100%',
                // 上传文件接口(这个地址是我为了方便各位体验文件上传功能搭建的临时接口,请勿在生产环境使用!!!)
                serverUrl: '//localhost:9000/ueditor/server',
                // UEditor 资源文件的存放路径,如果你使用的是 vue-cli 生成的项目,通常不需要设置该选项,vue-ueditor-wrap 会自动处理常见的情况,如果需要特殊配置,参考下方的常见问题2
                UEDITOR_HOME_URL: '/static/ueditor/'
            },
            write : {
    
    
                title:'测试Title',
                msg:'',
            },
        }
    },
    computed: {
    
    

    },
    created (){
    
    

    },
	mounted (){
    
    

    },
    methods: {
    
    
        submit(){
    
    
            debugger
            this.write;
            console.log(this.write);
        }
    },
    watch: {
    
     

    }
})
</script>
.race-content{
    
    
  width: 1200px;
  margin:0 auto;
  background-color: #fff;
}
</style>

Guess you like

Origin blog.csdn.net/Beatingworldline/article/details/121539131