Created: 2012-03-20 19:57
Updated: 2013-11-18 12:26


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 lib directory):

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 src folder. Then, you can see the examples folder, or this simple example:


The option argument is an object.


There are 3 options at the moment, which are:

Option name Value(s) Description
prefix string A string which will prefix the inline editor.

function (keypressEvent, vieObject) returns boolean

  • keypressEvent is the event object
  • vieObject is an object which contains some VinlinEdit functions that you can use.

A callback which will be called before keypress processing.

It the return value is true, VInlinEdit won't process the event. It may be interessing for extending fonctionnalities such as Enter key, ...


function (keypressEvent, vieObject)

Arguments are the same of calback_pre_keypress

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 clear function by calling $('span.inline').data('vinlinedit').clear();.

Here's the list of functions:

Function name Arguments Return Description
  • (optional) content The new content of editor.
object The functions object, so you can chain. Clear the inline editor and reset as the initial state or with the parameters.
getContent() No argument string The content of the inline editor Returns the content of inline editor.
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more