wangeditor富文本编辑器,缩放在手机里展示的时候ios不能收入
解决办法: 1. contenteditable=“true” 2.样式加入 -webkit-user-select:text;
现在说一下该怎么加入:
(很多博客里都没过细的去展示)
1
//这里的代码是wangeditor 组件的代码
<template >
<div class="editor" >
<div ref="toolbar" class="toolbar">
</div>
<div ref="editor" contenteditable="true" class="text"> //这里 加入contenteditable="true"
</div>
</div>
</template>
<script>
import E from 'wangeditor'
import { getUploadFile } from '@/api/content'
import {getCookie} from '@/utils/cookie'
export default {
name: 'editoritem',
data() {
对于样式一定要注意 ,我之前在浏览器找到对应的class给加入 ,结果还是不行,所以就索性
div *{
-webkit-user-select:text;
outline: none;
}
div{
-webkit-user-select:text;
outline: none;
}
如果换行有问题的话 在app.vue 加入
.w-e-toolbar{flex-wrap: wrap;}
对于 上传的视频都是 frame 标签 不是video,这个在网上有修改富文本编辑器代码的文章