Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2008-12-04 13:57:52

niraj
New member
Registered: 2008-12-02
Posts: 5
Website

Getting what's before the caret

I'm trying to fix a bug.. specifically http://xinha.webfactional.com/ticket/1137 and I'm wondering if there is a way to get the DOM element that is before and after the current position of the caret. I basically need to get delete/backspace working for the equations plugin. The 0.95 and trunk versions both do absolutely nothing when you delete an equation. Any pointers would be appreciated, and of course I'll contribute the code back so that bug can be closed smile

Offline

#2 2008-12-10 09:16:35

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Getting what's before the caret

Thanks you are taking care of the plugin, as I don't have the time
Unfortunately what you want to do is not so super easy. You have to create a range and move it, which, especially in IE, is a pain  in the ass sad
Try having a look at the plugin SmartReplace, it also looks at what's before the caret

Good luck smile

Offline

Board footer

Powered by FluxBB