javascript - How to select current element in CKEditor..? - Stack Overflow

I want to select current(cursor position) element in CKEditor using java script.When right click event

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
Add a ment  | 

1 Answer 1

Reset to default 7

This is the solution you're looking for:

var editor = CKEDITOR.instances.editor1,
    sel = editor.getSelection();

sel.selectElement(sel.getStartElement());

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742419391a4440378.html

相关推荐

  • javascript - How to select current element in CKEditor..? - Stack Overflow

    I want to select current(cursor position) element in CKEditor using java script.When right click event

    8小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信