add and expose current block into sci namespace (editor/block)

add logseq-api and logseq-graph-parser into sci classes to make it avaliable in sci eval-string
add bindings custom-js to window object that can be defined in custom.js file as `customJs` object (for custom javascript function to be called from sci)
This commit is contained in:
Darwis
2022-11-10 11:01:08 +08:00
committed by Gabriel Horner
parent fd3bc86c73
commit 66f7656fd8
2 changed files with 15 additions and 9 deletions

View File

@@ -3252,9 +3252,9 @@
:else
[:<>
(lazy-editor/editor config (str (d/squuid)) attr code options)
(let [options (:options options)]
(let [options (:options options) block (:block config)]
(when (and (= language "clojure") (contains? (set options) ":results"))
(sci/eval-result code)))])])))))
(sci/eval-result code block)))])])))))
(defn ^:large-vars/cleanup-todo markup-element-cp
[{:keys [html-export?] :as config} item]