All Projects → yuku → Jquery Overlay

yuku / Jquery Overlay

DEPRECATED: use yuku-t/textoverlay

Programming Languages

javascript
184084 projects - #8 most used programming language

DEPRECATED: jquery-overlay is deprecated in favor of textoverlay project.

Simple Decorator for Textarea

Demo

How to Use

$('textarea').overlay(strategies);

strategies MUST an Array of Object.

strategies = [strategy];

Each strategy MUST have match and css properties.

strategy = {
  match: matchObject,
  css: cssObject
};

matchObject MUST be a RegExp, a String or an Array of String. When it is a RegExp, it SHOULD include 'g' flag.

matchObject = 'abc';  // every 'abc' match
matchobject = ['a', 'b', 'c'];  // every 'a' 'b' and 'c' match
matchObject = /\B@\w+/g; // every words start with @ match

cssObject MUST be a Object. It controls the style of boxes which are put under the matching strings in the textarea.

cssObject = {
  'background-color': 'glay',
  'border': 'solid 1 #555'
};

Todo

  • Auto resizing textarea

License

Licensed under the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].