mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 02:16:30 +00:00
ux: cmd+k to create page/block shapes
This commit is contained in:
15
src/main/frontend/handler/whiteboard.cljs
Normal file
15
src/main/frontend/handler/whiteboard.cljs
Normal file
@@ -0,0 +1,15 @@
|
||||
(ns frontend.handler.whiteboard
|
||||
(:require [frontend.state :as state]))
|
||||
|
||||
;; FIXME: embed /draw should be supported too
|
||||
(defn whiteboard-mode?
|
||||
[]
|
||||
(= (state/get-current-route) :whiteboard))
|
||||
|
||||
(defn create-page!
|
||||
[page-title]
|
||||
(when-let [app ^js (state/get-current-whiteboard)]
|
||||
(.createShapes app (clj->js
|
||||
[{:id (str "logseq-portal-" "clojure")
|
||||
:type "logseq-portal"
|
||||
:pageId page-title}]))))
|
||||
Reference in New Issue
Block a user