【发布时间】:2011-07-03 10:08:34
【问题描述】:
我读取文件(文件大小超过 2.5Mb)并使用 tinyMCE 将内容显示到 textarea。
在加载到 textarea 期间发生脚本错误。 错误是
A script on this page may be busy, or it may have stopped responding.
You can stop the script now, open the script in the debugger, or let the script continue.
Script: http://localhost:8080/tiny-rich-editor/faces/tinyEditor-orginal/tinymce/jscripts/tiny_mce/tiny_mce.js:1
在 tinyMCE 中使用以下代码后出现此错误
ed.onBeforeSetContent.add(function(ed, o) {
// Replaces all \n characters with <br> tag
o.content = o.content.replace(/\n/g, '<br>');
});
上面的代码用于逐行显示内容。如果不使用上述代码,则 textarea 将所有内容显示为非原始格式。像一行一行的。
帮帮我。 提前致谢。
【问题讨论】:
标签: javascript jsp jsf richfaces tinymce