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

  (.redo (->cm-ed e)))

(defn copy [e]
  (.set clipboard (selection e) "text"))

(defn cut [e]
  (copy e)
  (replace-selection e ""))

(defn paste [e]
  (replace-selection e (.get clipboard "text")))

(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]
            [lt.objs.platform :as platform])
  (: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"))

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