在CKEditor中:根据我的要求,我只想按其Id选择元素并滚动到该位置。
我已经写了代码,这是很好的工作在FF,但我没有得到解决方案的IE。
贝娄是FF的代码:
Ele = EditorInstance.document.getById(Id);
EditorInstance.getSelection().selectElement(Ele);
Ele.scrollIntoView();发布于 2012-11-22 12:53:43
我试过下面的密码和它的工作..。
Ele = EditorInstance.document.getById(Id);
EditorInstance.focus();
var element = EditorInstance.document.getBody().getLast();
var selection = EditorInstance.getSelection();
selection.selectElement(Ele);
selection.scrollIntoView();发布于 2013-05-03 23:09:54
基于http://dev.ckeditor.com/ticket/7561和http://dev.ckeditor.com/attachment/ticket/7561/7561.patch的
这样的补丁也能用..。
Index: _source/plugins/selection/plugin.js
===================================================================
--- a/public/ckeditor-3.6.4/_source/plugins/selection/plugin.js
+++ b/public/ckeditor-3.6.4/_source/plugins/selection/plugin.js
@@ -710,7 +710,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
}
catch ( e )
{
- this.isInvalid = true;
+ document.getWindow().focus();
}
}https://stackoverflow.com/questions/13494773
复制相似问题