npm install banksy --save
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.
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.
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.
To properly destroy the bridge, you can run bridge.destroy()
. Note that this will destroy the horse
instance as well, calling horse.destroy()
.
MIT