我这样做有问题。我无法访问内容区域对象。我需要它来附加一个点击监听器。
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);
创建编辑器后它可以工作,但只有当我用调试器踩过它时,否则它是未定义的。所以这可能是一个时间问题。但是我应该在那里得到那个呢?
答案 0 :(得分:0)
答案 1 :(得分:0)
<script type="text/javascript">
var object;
function FCKeditor_OnComplete(editorInstance)
{
object = editorInstance;
}
function Display()
{
alert( object.GetHTML());
}
</script>