VInlinEdit jQuery Plugin v1.0.0
Copyright (c) 2012 Samuel ROZE. Licenced under the GPLv3 license.
Vinlinedit is a jQuery plugin that provide an inline edit for text spans. The principal attribute is that the editor's style is like vi.
This plugin requires this tow librairies (which are in the
How to use
In order to use this plugin, you just have to include the JS and CSS files (and, of course, the requirements) which are in the
Then, you can see the
examples folder, or this simple example:
option argument is an object.
There are 3 options at the moment, which are:
|prefix||string||A string which will prefix the inline editor.|
function (keypressEvent, vieObject) returns boolean
A callback which will be called before keypress processing.
It the return value is
function (keypressEvent, vieObject)
Arguments are the same of
|A callback which will be called after keypress processing.|
Interactions & Functions
VinlinEdit provides functions to interact with the inline editor. Functions are stored in an object that you can retreive by tow way:
- The second argument of callbacks is this object.
- You can retrieve the object using
data('vinlinedit'). For example, if you've initialized VInlinEdit with
$('span.inline'), you can can the
clearfunction by calling
Here's the list of functions:
||Clear the inline editor and reset as the initial state or with the parameters.|
||Returns the content of inline editor.|