javascript - FCKEditor:访问内容区域

标签 javascript fckeditor clicklistener

我在执行此操作时遇到问题。我无法访问内容区域对象。我需要它来附加一个点击监听器。

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:访问内容区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9517606/

相关文章:

用作混合数据结构的 JavaScript 对象

javascript - 我使用的复选框插件无法正常工作

tinymce - 如何为 XUL 应用程序使用富文本编辑器

javascript - Ckeditor如何将键盘快捷键应用于特定样式

css - 网页 css 覆盖 ckeditor 3 样式

android - Efficientadapter OnItemClick 监听器

c# - 在 Internet Explorer 中使用 javascript 和 XPATH 获取元素

Javascript 拆分不识别中间点

java - libGDX:ClickListener 中的延迟

android - Recyclerview + CardView OnClickListener