admin管理员组文章数量:1336660
I want to select current(cursor position) element in CKEditor using java script.
When right click event happens i have to select an element where i am right clicking.
I want to select current(cursor position) element in CKEditor using java script.
When right click event happens i have to select an element where i am right clicking.
Share Improve this question edited Jul 17, 2012 at 11:33 Ramesh asked Jul 17, 2012 at 10:13 RameshRamesh 1,0836 gold badges26 silver badges53 bronze badges 2- 1 What do you mean by "current (cursor position) element"? – Reinmar Commented Jul 17, 2012 at 11:11
- i am using context menu item. when an context menu button clicked i have to select that element where the click happens. – Ramesh Commented Jul 17, 2012 at 11:35
1 Answer
Reset to default 7This is the solution you're looking for:
var editor = CKEDITOR.instances.editor1,
sel = editor.getSelection();
sel.selectElement(sel.getStartElement());
本文标签: javascriptHow to select current element in CKEditorStack Overflow
版权声明:本文标题:javascript - How to select current element in CKEditor..? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742419390a2471352.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论