madebymany/sir-trevor-js — pull request #162 by cobbweb (2014-01-16 03:56:59+00:00)
Title: Allow Format Bar container to be configured

This is a non-breaking change that lets you specify the container for the FormatBar. This is useful if you're using Sir Trevor inside a scrollable element.

Here is an [example page](https://gist.github.com/cobbweb/8449414) to prove this works (you'll have to checkout my branch).

I had to add some more trickery to how the FormatBar calculates its position to support this but it works fine on my end. I avoided using jQuery because I know removing it is on the roadmap. I haven't written tests for this part yet, but might if I get time in the future.

I'm pretty sure the FormatBar position logic can be cleaned up a bit, and it also breaks if you specify a custom `formatBarContainer` that isn't scrollable.

I can appreciate if you think this might be an edge-case you'd rather not support. I think I can monkey-patch on my end support this for my usage.

Also included are some miscellaneous changes to `package.json`... I can remove those commits and possibly create a separate PR if you wish.

Fixes #161