mirror of
https://github.com/logseq/logseq.git
synced 2026-04-28 16:15:21 +00:00
Fix lazy loading
This commit is contained in:
@@ -23,8 +23,7 @@
|
||||
(.convert (js/window.Asciidoctor) content (clj->js config)))))
|
||||
(loaded? [this]
|
||||
(some? (loaded?)))
|
||||
(lazyLoad [this ok-handler error-handler]
|
||||
(lazyLoad [this ok-handler]
|
||||
(loader/load
|
||||
"https://cdnjs.cloudflare.com/ajax/libs/asciidoctor.js/1.5.9/asciidoctor.min.js"
|
||||
ok-handler
|
||||
error-handler)))
|
||||
ok-handler)))
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
(.makeHtml (js/window.showdown.Converter.) content)))
|
||||
(loaded? [this]
|
||||
(some? (loaded?)))
|
||||
(lazyLoad [this ok-handler error-handler]
|
||||
(lazyLoad [this ok-handler]
|
||||
(loader/load
|
||||
"https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"
|
||||
ok-handler
|
||||
error-handler)))
|
||||
ok-handler)))
|
||||
|
||||
@@ -27,11 +27,10 @@
|
||||
(.parseHtml js/window.MldocOrg content config)))
|
||||
(loaded? [this]
|
||||
(some? (loaded?)))
|
||||
(lazyLoad [this ok-handler error-handler]
|
||||
(lazyLoad [this ok-handler]
|
||||
(loader/load
|
||||
(config/asset-uri "/static/js/mldoc_org.min.js")
|
||||
ok-handler
|
||||
error-handler)))
|
||||
ok-handler)))
|
||||
|
||||
(defn parse-json
|
||||
([content]
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
(defprotocol Format
|
||||
(toHtml [this content config])
|
||||
(loaded? [this])
|
||||
(lazyLoad [this ok-handler error-handler]))
|
||||
(lazyLoad [this ok-handler]))
|
||||
|
||||
Reference in New Issue
Block a user