今天在使用UEditor的setContent的时候报错,报错代码如下

TypeError: me.body is undefinedUncaught TypeError: Cannot set property 'innerHTML' of undefined 错误的原因是没有等UEditor创建完成就使用UEditor的setContent函数了,可以通过如下代码解决 方法一:

ueditor.addListener("ready", function () {
ueditor.setContent('UEditor报错TypeError: me.body is undefined');
});

方法二:

ueditor.ready(function() {
ueditor.setContent('UEditor报错TypeError: me.body is undefined');
});

ueditor UEditor的setContent的时候报错的更多相关文章

  1. 使用ueditor中的setContent() 时经常报innerHtml错误(笔记)

    1)今天遇到个问题,使用ueditor中的setContent() 时经常报innerHtml错误:网上找了下解决方案:发现这个可以用: 不能创建editor之后马上使用ueditor.setCont ...

  2. ueditor富文本上传图片的时候报错"未找上传数据"

    最近因为需求所以在ssh项目中使用了Ueditor富文本插件,但是在上传图片的时候总是提示“未找到上传数据”,之后百度了好久终于弄明白了.因为Ueditor在上传图片的时候会访问controller. ...

  3. 富文本编辑器layedit,调用setContent方法会报错

    需要把layedit.js里的setContent 函数的 layedit.sync(index)); 改成 this.sync(index));

  4. [转载]UEditor报错TypeError: me.body is undefined

    本文转载来自:UEditor报错TypeError: me.body is undefined 今天在使用UEditor的setContent的时候报错,报错代码如下 TypeError: me.bo ...

  5. 百度编辑器 UEditor 报错汇总

    1,编辑文本时使用js将需要编辑内容setContent到编辑器里,总是报(IE8及IE11):'this.body' 为空或不是对象,详细如下,其实报这样的错除多半是加载先后或加载不完全导致的: 消 ...

  6. 在maven项目中引用ueditor报错问题

    遇到的问题:将pom.xml中引入 <dependency> <groupId>com.baidu</groupId> <artifactId>uedi ...

  7. vue-ueditor-wrap报错,vue ueditor 加载ueditor.config.js失败,请检查您的配置地址UEDITOR_HOME_URL填写是否正确!

    1.第一次报错后,仔细看了官方文档,少了第一步,下载UEditor源码,放到public目录(前提你用的是vue-cli 3.x的版本). 好那就下载,下载的是vue-ueditor-wrap作者修复 ...

  8. UEditor设置内容setContent()失效的解决方法

    ueditor常见用法: https://blog.csdn.net/qq_31879707/article/details/54894735#UE.Editor:setContent() UEdit ...

  9. 报错:org.hibernate.AssertionFailure: null id in com.tt.hibernate.entities.News entry (don't flush the Session after an exception occurs)

    在使用hibernate创建数据库的表格时,出现了如下报错: 十二月 28, 2016 10:17:02 上午 org.hibernate.tool.hbm2ddl.SchemaExport perf ...

随机推荐

  1. Qt Creator 中自动补全的快捷键描述

    在TextEdit中的completeThis

  2. VisualPage重定向

    开发文档链接:https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_override ...

  3. 检测一个DLL文件是x64还是x86

    对于一个DLL,我们如何判定其是32位的还是64位的,或者是any cpu的platform? Visual Studio提供了一个很好的工具:corflags,这个是内嵌到Developer Com ...

  4. 使用script转储终端命令输出,或者录制并播放session的内容

    摘自:http://leohot.blog.163.com/blog/static/1348656022012729113658473/ 注意: 1. 启动script时没有指定文件名,它会自动记录到 ...

  5. RegisterUserFunc为测试对象添加新方法或重写已有方法

    QTP中为了提高扩展性,提供了一个为测试对象添加一个新的自定义方法,或者重写测试对象已有的方法的函数RegisterUserFunc,在此给大家分享一下. RegisterUserFunc:为测试对象 ...

  6. Linux 正文处理命令及tar vi 编辑器

    root 用户不受权限设置 如果文件有x 就可以执行 对目录的权限 r:可以查看目录下面的文件名 w:可以在该目录下新建,删除,修改文件名 x:可以cd进入目录 对于文件: 可执行的文件来说需要有可读 ...

  7. 关于win7 下双击不能打开jar 文件

    关于这个问题解决如下: 我的java 安装路径为C:\java\jdk1.6\bin 1,首先检查jdk 的路径是否安装正确. 2,导出jar 包时,是否有添加 main class. 如果通过在do ...

  8. loop

    -- ------------------------loop---------------------------delimiter $DROP PROCEDURE IF EXISTS my_cou ...

  9. 关于play!的attachments.path配置、以及关于Form表单上传请求的认识

    相关链接 form表单提交multipart/form-data的请求分析:http://blog.csdn.net/five3/article/details/7181521.http://blog ...

  10. 最短路dijkstra堆优化

    demo: #include<bits/stdc++.h> #define max_v 102000 #define inf 0x3f3f3f3f using namespace std; ...