bevacqua / banksy

:city_sunrise: Street art between woofmark and horsey

Home Page:https://ponyfoo.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

banksy

Street art between woofmark and horsey

Install

npm install banksy --save

Features

Banksy helps you integrate the autocompletion features of horsey into a woofmark editor. It does this as unobtrusively as possible, by listening for a few events and running commands on your editor instance. Afterwards, the banksy instance destroys the horse when you're done with it, properly cleaning up after itself.

Usage

Granted that you want to integrate a horsey instance into a woofmark editor, you can use banksy to alleviate the load, as it can be pretty confusing to make the two work in tandem.

banksy(el, options)

After instantiating both the editor and the horse, use banksy to paint a bridge between the two.

var editor = woofmark(el);
var horse = horsey(el);
var bridge = banksy(el, {
  editor: editor,
  horse: horse
});

That's it, now horse will work as you'd expect on all types of input for the woofmark editor.

bridge.destroy()

To properly destroy the bridge, you can run bridge.destroy(). Note that this will destroy the horse instance as well, calling horse.destroy().

License

MIT

About

:city_sunrise: Street art between woofmark and horsey

https://ponyfoo.com

License:MIT License


Languages

Language:JavaScript 85.6%Language:HTML 14.4%