Matt here, one of the folks working on Mobiledoc and the related editor. This blog post definitely served as early inspiration for our work. I dare to say we do a number of things better than medium now.
Mobiledc-kit is on npm as amd and es6. I believe also as CommonJS for browserify, but open an issue if it isn't.
If you use Ember, this add-on provides a more complete UI:
Is there a .js file I can drop somewhere, or can I use npm+browserify to include it as a module?