{"id":2764,"date":"2013-02-05T10:23:08","date_gmt":"2013-02-05T16:23:08","guid":{"rendered":"http:\/\/bililite.com\/blog\/?p=2764"},"modified":"2014-02-26T17:15:43","modified_gmt":"2014-02-26T23:15:43","slug":"improved-bililiterange","status":"publish","type":"post","link":"https:\/\/bililite.com\/blog\/2013\/02\/05\/improved-bililiterange\/","title":{"rendered":"Improved <code>bililiteRange<\/code>"},"content":{"rendered":"<p>I've been working on a project that uses <a href=\"http:\/\/bililite.com\/blog\/2011\/01\/17\/cross-browser-text-ranges-and-selections\/\" title=\"Cross-Browser Text Ranges and Selections\"><code>bililiteRange<\/code><\/a> a lot, so I added two improvements: plugins and events.<\/p>\r\n<p><code class=\"language-javascript\" >bililiteRange.fn.myplugin = function() {};<\/code> or  <code class=\"language-javascript\" >bililiteRange.extend({ myplugin1: function() {}, myplugin2: function(){} });<\/code> creates new functions for a bililiteRange (just like with jQuery).<\/p>\r\n<p>Also, the <code>text<\/code> method now triggers an <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/DOM\/DOM_event_reference\/input\"><code>input<\/code> event<\/a> on the element. Only works on browsers that implement <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/DOM\/Event\/CustomEvent\"><code>CustomEvent<\/code><\/a>.<\/p>","protected":false},"excerpt":{"rendered":"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 [&hellip;]","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,10],"tags":[],"_links":{"self":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/2764"}],"collection":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/comments?post=2764"}],"version-history":[{"count":4,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/2764\/revisions"}],"predecessor-version":[{"id":2772,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/2764\/revisions\/2772"}],"wp:attachment":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/media?parent=2764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/categories?post=2764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/tags?post=2764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}