使用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 ...
随机推荐
- php扩展安装方式
目录 扩展安装 php源码编译安装 PEAR.PECL phpize 源码安装 扩展安装 以php安装swoole扩展为例. php源码编译安装 下载源码包并编译安装 $ wget http://cn ...
- Java的设计模式(6)— 模板模式
定义一个操作中算法的骨架,将一些步骤放在子类实现,使得子类可以不改变一个算法结构即子类可以重定义该算法的某些特定步骤. 主要有两个角色: 1. 抽象模板 :是一个抽象类,并实现了一个具体模板方法,这个 ...
- python技巧 — Chrome浏览器中的 XPath Helper
用于XPath 爬取网页结构的时候使用, 安装后 快捷键调用 左边 ctrl+ shift+x 启动 安装流程: 1. 打开chrome浏览器,扩展程序 .搜索 XPath Helper 下载安装(前 ...
- PAT甲级题分类汇编——图
本文为PAT甲级分类汇编系列文章. 图,就是层序遍历和Dijkstra这一套,#include<queue> 是必须的. 题号 标题 分数 大意 时间 1072 Gas Station 3 ...
- Arm-Linux 移植 FFMPEG库 + x264
背景: ffmpeg 中带有264的解码,没有编码,需要添加x264.libx264是一个自由的H.264编码库,是x264项目的一部分,使用广泛,ffmpeg的H.264实现就是用的libx26 ...
- 开源微信小程序商城测评
1. Java版 1)微同商城 减少重复造轮子,开源微信小程序商城 .快速搭建一个属于自己的微信小程序商城. 官网地址:https://fly2you.cn 开源地址:https://gitee.co ...
- SVN_01概念
客戶端TortoiseSVN 服务器端VIsualSVN SVN是Apache Subversion的缩写,是一个开放源代码的版本控制系. 这些数据放置在一个中央资料库(repository)中.这 ...
- Spark机器学习基础-无监督学习
0.K-means from __future__ import print_function from pyspark.ml.clustering import KMeans#硬聚类 #from p ...
- leetcode算法题(4)
问题描述: 罗马数字包含以下七种字符: I, V, X, L,C,D 和 M. 我的解答: package Simple; public class RoamnInt { public static ...
- iOS - SceneKit 3D引擎初探
最近到处搜集资料研究3D最后还是决定锁定OC框架,找到的学习资料随后慢慢整理 SceneKit 是一个OC 框架,开始之前,先熟悉一下SceneKit 的三维坐标系: 很清楚的看到,SceneKit ...