How ro get reference of dom element where cursor is currently positioned. I need to use reference of dom element to add style attributes to it.
Suppose current curser position is after 'Rah' in ckeditor.
How can I get reference of span element surrounding "Rah".
Thanks.
Suppose current curser position is after 'Rah' in ckeditor.
<div><span>Rahul</span></div>
How can I get reference of span element surrounding "Rah".
Thanks.
Re: How to get reference of dom element where cursor is plac
where your_editor probably is "this" if you use that code from within CKEditor.
Re: How to get reference of dom element where cursor is plac
Thanks a lot. Worked fine in all browsers except IE.
In Internet Explorer (IE8) when there is no selection(only cursur is placed in CKEditor).
Re: How to get reference of dom element where cursor is plac
In IE
is returned as null when there is no selection and cursor position is on text element(Span in my case).
Sample demonstrating this IE bug:
Re: How to get reference of dom element where cursor is plac