Skip to content

{ Monthly Archives } February 2013

Parsing keydown events

This post is obsolete; the $.keymap has changed significantly. Documentation is now at http://bililite.com/blog/2015/01/12/rethinking-keymap/. I've been playing around with creating an online editor, and one thing it needs is keyboard shortcuts. Control keys and the like don't register keypress events, so I have to use keydown to get the event.which (and I have to use […]

Scrolling to Cross-browser Ranges

One thing I wanted to add to my bililiteRange was the ability to scroll the range into view without changing the selection. As with all things having to do with ranges, there's no consistent way to do it, and Internet Explorer does it best (this is the only time you'll hear me say that).

bililiteRange Plugins

Edited 2014-02-27 to add the indentation code. I created a collection of useful plugins for my bililiteRange, for more sophisticated manipulations. Now you can search the element with a regular expression, and you can keep the range "live", adjusting it when the text is edited. Download the code. See the demo. (The dynamic highlighting is […]

Improved bililiteRange

I've been working on a project that uses bililiteRange a lot, so I added two improvements: plugins and events. bililiteRange.fn.myplugin = function() {}; or bililiteRange.extend({ myplugin1: function() {}, myplugin2: function(){} }); creates new functions for a bililiteRange (just like with jQuery). Also, the text method now triggers an input event on the element. Only works […]