【发布时间】:2012-03-20 00:43:18
【问题描述】:
我在执行此操作时遇到问题。我无法访问内容区域对象。我需要它来附加一个点击监听器。
var oFCKeditor = new FCKeditor( editorName ) ;
oFCKeditor.BasePath = o.editorPath;
if (o.configPath) {
oFCKeditor.Config["CustomConfigurationsPath"] = o.configPath +"?" + ( new Date() * 1 ) ;
}
oFCKeditor.Width = '100%';
oFCKeditor.Height = '100%';
oFCKeditor.ReplaceTextarea();
oFCKeditor.setEnabled(true);
alert(oFCKeditor.EditorDocument);
alert(oFCKeditor.EditorWindow);
alert(FCK);
我还尝试从 FCKEditor 代码中的不同部分访问那里的对象,但没有运气。
我做错了什么?这样做的通常方法是什么?
谢谢
编辑:当我这样做时:
var oEditor = FCKeditorAPI.GetInstance(editorName) ;
alert(oEditor.EditorDocument);
在创建编辑器后它可以工作,但只有当我使用调试器单步执行它时,否则它是未定义的。所以这可能是一个时间问题。但那我应该从哪里得到呢?
【问题讨论】:
标签: javascript fckeditor clicklistener