   (.redo (->cm-ed e)))
 
 (defn copy [e]
-  (.set clipboard (selection e) "text"))
+  (platform/copy (selection e)))
 
 (defn cut [e]
   (copy e)
   (replace-selection e ""))
 
 (defn paste [e]
-  (replace-selection e (.get clipboard "text")))
+  (replace-selection e (platform/paste)))
 
 (defn select-all [e]
   (set-selection e

            [lt.objs.menu :as menu]
            [lt.util.events :as ev]
            [lt.util.dom :as dom]
            [lt.util.load :as load])
  (:use [lt.util.dom :only [remove-class add-class]]
        [lt.object :only [object* behavior*]]
        [lt.util.cljs :only [js->clj]])
  (:require-macros [lt.macros :refer [behavior]]))

(def gui (js/require "nw.gui"))
(def clipboard (.Clipboard.get gui))

;;*********************************************************
;; commands

                                      (cut this))}
                            {:label "Paste"
                             :order 3
                             :enabled (boolean (not (empty? (platform/paste))))
                             :click (fn []
                                      (paste this))}
                            {:type "separator"
