Skip to content

yuku/old-textoverlay

Repository files navigation

textoverlay

Simple decorator for textarea elements.

Demo

new Textoverlay(document.getElementById("textarea"), [
  {
    match: /\B@\w+/g,
    css: { "background-color": "#d8dfea" }
  },
  {
    match: /e\w{8}d/g,
    css: { "background-color": "#cc9393" }
  }
]);

Live demo

Installation

npm install textoverlay

License

Textoverlay is released under the MIT License.