使用UEditor 报错Cannot read property 'nodeType' of undefined 解决办法
报如下错误
解决办法:
//对编辑器的操作最好在编辑器ready之后再做
ue.ready(function() {
})
<!-- 实例化编辑器 -->
<script type="text/javascript">
$(function(){
var ue = UE.getEditor("container",{
autoHeight: false
});
/对编辑器的操作最好在编辑器ready之后再做
ue.ready(function() {
//设置编辑器的内容
ue.setContent('hello');
//获取html内容,返回: <p>hello</p>
var html = ue.getContent();
alert(html)
//获取纯文本内容,返回: hello
var txt = ue.getContentTxt();
alert(txt);
});
});
</script>
使用UEditor 报错Cannot read property 'nodeType' of undefined 解决办法的更多相关文章
- 小程序 for循环 报错 Cannot read property 'total' of undefined
for循环一直报错 Cannot read property 'total' of undefined,但total在起初是有定义的,后来找到了问题,是i<=的问题,改为<不报错了. i ...
- datatables 多一列报错Cannot read property 'sWidth' of undefined(…)/少一列报错Cannot read property 'style' of undefined(…)
datatables 多一列报错Cannot read property 'sWidth' of undefined(…)/少一列报错Cannot read property 'style' of u ...
- vue.config.js报错cannot set property "preserveWhitespace" of undefined
vue.config.js报错cannot set property "preserveWhitespace" of undefined 最近在项目中配置webpack,由于vue ...
- jenkins编辑报错Exception when publishing, exception message的解决办法
jenkins编辑报错Exception when publishing, exception message的解决办法 查看目标主机的磁盘空间是否占满,清理磁盘空间即可
- 第一次打开pycharm运行python文件报错”No Python interpreter selected“问题的解决办法
前面没有细讲,这里细述一下安装pycharm后,第一次打开pycharm运行python文件报错"No Python interpreter selected"问题的解决办法. 出 ...
- 项目报错:/uploads: Read-only file system(解决办法)
项目报错:/uploads: Read-only file system(解决办法) 本来以为是service层没加注解,翻到最后才发现问题 原因是项目根目录没有对应的文件夹,在项目根目录创建uplo ...
- vue项目中使用echarts map报错Cannot read property 'push' of undefined nanhai.js
在vue中绘制地图需要加载一个本地china.json文件,我用的是get请求的方法加载的,而不是直接import,因为我怕import请求到的部署到线上的时候会有问题.如下是get请求方法: thi ...
- [Element-UI] 使用Element-UI的DateTimePicker组件报错:Cannot read property 'getHours' of undefined
使用Element-UI组件的DateTimePicker,如下: <template> <div class="block"> <span clas ...
- echarts报错Cannot read property 'features' of undefined
引入地图的时候 echarts2报错: Uncaught Error: [MODULE_MISS]"echarts/src/util/mapData/params" is not ...
随机推荐
- Web基础和servlet基础
TomCat的目录结构 Bin:脚本目录(存放启动.关闭这些命令) Conf:存放配置文件的目录 Lib:存放jar包 Logs: 存放日志文件 Temp: 临时文件 Webapps: 项目发布目录 ...
- python 之 前端开发( DOM操作)
11.47 DOM操作 查找节点: 11.471 直接查找 document.getElementById //根据ID获取唯一一个标签 document.getElementsByClassName ...
- 简单即时通讯、聊天室--java NIO版本
实现的功能: 运行一个服务端,运行多个客户端.在客户端1,发送消息,其余客户端都能收到客户端1发送的消息. 重点: 1.ByteBuffer在使用时,注意flip()方法的调用,否则读取不到消息. 服 ...
- Angular 学习笔记 (动态组件 & Material Overlay & Dialog 分析)
更新: 2019-11-24 dialog vs router link refer : https://stackoverflow.com/questions/51821766/angular-m ...
- 在论坛中出现的比较难的sql问题:10(删除多表中的同一个外键)
原文:在论坛中出现的比较难的sql问题:10(删除多表中的同一个外键) 最近,在论坛中,遇到了不少比较难的sql问题,虽然自己都能解决,但发现过几天后,就记不起来了,也忘记解决的方法了. 所以,觉得有 ...
- iis安装ssl证书
在证书控制台下载IIS版本证书,下载到本地的是一个压缩文件,解压后里面包含.pfx文件是证书文件,pfx_password.txt是证书文件的密码. 友情提示: 每次下载都会产生新密码,该密码仅匹配本 ...
- Lucid Dream
Lucid Dream 作者:Lo Stigmergy链接:https://www.zhihu.com/question/21260829/answer/35733194 清醒状态下时意识和潜意识基本 ...
- 【转载】Request对象的作用以及常见属性
Request对象是Asp.Net应用程序中非常重要的一个内置对象,其作用主要用于服务器端获取客户端提交过来的相应信息,比较常用的有使用Requset对象获取用户提交的html表单信息,Request ...
- ABAP-会计凭证替代字段GB01设置
1.GB01表字段设置 SM30:VWTYGB01 找到需要替代的字段,设置bexclude勾选为空 2.运行程序 RGUGBR00 激活
- ble编程-外设发送数据到中心
一.外设 1.在外设的.h文件中定义如下 1 //周边管理者 2 3 @property (nonatomic , strong) CBPeripheralManager *peripheralM ...