Created
January 16, 2014 01:42
-
-
Save zbyte64/8448337 to your computer and use it in GitHub Desktop.
Render alpacajs form in OM (clojsurescript react.js library); AKA render raw html in OM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn show-form [data _] | |
(om/component | |
(let [schema (:current-form data) | |
alpaca-html (.html (.alpaca (js/jQuery. "<div/>") (clj->js {:schema schema}))) | |
form-html (js/React.DOM.div (clj->js {:dangerouslySetInnerHTML {:__html alpaca-html}}))] | |
form-html))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment