keystonejs/keystone — pull request #724 by mgan59 (2014-11-18 05:16:16+00:00)
Title: added support for markdown field

## Work

![react-markdown-demo](https://cloud.githubusercontent.com/assets/89339/5082839/d413e684-6eb7-11e4-9563-c274ac3d59ab.gif)

## Implementation Notes

First attempt at react component field. I wanted to reuse as much of the code that was already in place (aka reuse bootstrap-markdown). In order to do this I bundled jquery into browserify so that the bootstrap-markdown would mount onto `$.()`. From there I used the react `ref` method to hand off the currentDom node. I ran into an issue with `marked` not being scoped from within the boostrap-markdown, this meant the preview button would not render html processed by marked. To fix the issue I `required` marked in the boostrap-markdown.js so that it would be scoped accordingly.

p.s. sorry if the spacing is all messed up, sublime doesn't like my tabs and I kept pasting code from a vim window which has soft-spaces.