mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 07:31:36 +02:00
fix(frontend): add render-to-html function
This commit is contained in:
parent
b428d1dc23
commit
ea1bfd5eaa
3 changed files with 10 additions and 4 deletions
|
@ -6,7 +6,8 @@
|
|||
;; Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
||||
|
||||
(ns uxbox.util.dom
|
||||
(:require [goog.dom :as dom]))
|
||||
(:require [goog.dom :as dom]
|
||||
[cljsjs.react.dom.server]))
|
||||
|
||||
;; --- Deprecated methods
|
||||
|
||||
|
@ -24,6 +25,10 @@
|
|||
|
||||
;; --- New methods
|
||||
|
||||
(defn render-to-html
|
||||
[component]
|
||||
(.renderToStatciMarkup js/ReactDOMServer component))
|
||||
|
||||
(defn get-element-by-class
|
||||
([classname]
|
||||
(dom/getElementByClass classname))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue