报如下错误

解决办法:

//对编辑器的操作最好在编辑器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 解决办法的更多相关文章

  1. 小程序 for循环 报错 Cannot read property 'total' of undefined

    for循环一直报错  Cannot read property 'total' of undefined,但total在起初是有定义的,后来找到了问题,是i<=的问题,改为<不报错了. i ...

  2. 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 ...

  3. vue.config.js报错cannot set property "preserveWhitespace" of undefined

    vue.config.js报错cannot set property "preserveWhitespace" of undefined 最近在项目中配置webpack,由于vue ...

  4. jenkins编辑报错Exception when publishing, exception message的解决办法

    jenkins编辑报错Exception when publishing, exception message的解决办法 查看目标主机的磁盘空间是否占满,清理磁盘空间即可

  5. 第一次打开pycharm运行python文件报错”No Python interpreter selected“问题的解决办法

    前面没有细讲,这里细述一下安装pycharm后,第一次打开pycharm运行python文件报错"No Python interpreter selected"问题的解决办法. 出 ...

  6. 项目报错:/uploads: Read-only file system(解决办法)

    项目报错:/uploads: Read-only file system(解决办法) 本来以为是service层没加注解,翻到最后才发现问题 原因是项目根目录没有对应的文件夹,在项目根目录创建uplo ...

  7. vue项目中使用echarts map报错Cannot read property 'push' of undefined nanhai.js

    在vue中绘制地图需要加载一个本地china.json文件,我用的是get请求的方法加载的,而不是直接import,因为我怕import请求到的部署到线上的时候会有问题.如下是get请求方法: thi ...

  8. [Element-UI] 使用Element-UI的DateTimePicker组件报错:Cannot read property 'getHours' of undefined

    使用Element-UI组件的DateTimePicker,如下: <template> <div class="block"> <span clas ...

  9. echarts报错Cannot read property 'features' of undefined

    引入地图的时候 echarts2报错: Uncaught Error: [MODULE_MISS]"echarts/src/util/mapData/params" is not ...

随机推荐

  1. [转帖]Nginx rewrite 规则 与 proxy_pass 实现

    Nginx rewrite 规则 与 proxy_pass 实现 https://www.cnblogs.com/jicki/p/5546916.html Nginx rewrite 规则  与 pr ...

  2. [转帖]AMD:Zen 2霄龙处理器每美元性能可达英特尔至强5.6倍

    AMD:Zen 2霄龙处理器每美元性能可达英特尔至强5.6倍 2019-10-20 6:35:38来源:IT之家作者:孤城责编:孤城评论:32 https://www.ithome.com/0/451 ...

  3. redis 主从 哨兵

    数据库为什么要读写分离 写代码好多年了,大家先抛弃在代码框架里面各种花哨的设计之外,写的代码到最后无非就是为了增删查改数据库.一般项目数据库刚开始只是但一个库,随着数据量的增大,就开始优化数据库(抛开 ...

  4. C++基础(静态数据成员和静态成员函数)

    [简介] 1.静态数据成员在类中声明,在源文件中定义并初始化: 2.静态成员函数没有this指针,只能访问静态数据成员: 3.调用静态成员函数:(1)对象.(2)直接调用: 4.静态成员函数的地址可用 ...

  5. 暑期ACM集训

    2019-07-17 08:42:11 这是总结昨天的做题情况 总体来说,好久的没做题了,实力下降了许多,这一个月假又学习吧!!!! A - Ropewalkers Polycarp decided ...

  6. 微信公众号h5页面自定义分享

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  7. PowerBuilder学习笔记之根据新PBL文件替换pbd文件的方法

    在程序目录上右键,选择Build Runtime Library 在Build Runtime Library 页面点击OK,注意,会将全部的文件重新编译

  8. Java连接Jira,创建、修改、删除工单信息

    还不了解Jira是什么的同学可以看一下这篇文章:https://www.cnblogs.com/wgblog-code/p/11750767.html 本篇文章主要介绍如何使用Java操作Jira,包 ...

  9. Golang官方log包详解

    Golang官方log包详解 以下全是代码, 详解在注释中, 请从头到尾看 // Copyright 2009 The Go Authors. All rights reserved. // Use ...

  10. VBA While Wend循环

    在While...Wend循环中,如果条件为True,则会执行所有语句,直到遇到Wend关键字. 如果条件为false,则退出循环,然后控件跳转到Wend关键字后面的下一个语句. 语法 以下是VBA中 ...