3 Examples🔗ℹ

The simplest use opens an empty editor and returns immediately:

(require rackedit)
 
(rkdt)

Supply a filename to open a file:

(rkdt "notes.rkt")

Use #:wait? #t when execution should continue only after the editor is closed:

(rkdt "notes.rkt" #:wait? #t)

A frame callback can customize the editor before it becomes visible:

(require racket/class
         rackedit)
 
(rkdt "notes.rkt"
      #:frame-cb
      (λ (call-time frame)
        (when (eq? call-time 'before-show)
          (send frame
                set-label
                (string-append (send frame get-label)
                               " - Rash")))))

The same callback can react to multiple lifecycle moments:

(rkdt "notes.rkt"
      #:wait? #t
      #:frame-cb
      (λ (call-time frame)
        (case call-time
          [(before-show)
           (displayln "Editor will be shown")]
          [(after-show)
           (displayln "Editor is shown")]
          [(wait-for-close)
           (displayln "Waiting for the editor to close")]
          [(on-close)
           (displayln "Editor is closing")])))

The initial window geometry can be supplied explicitly:

(rkdt "notes.rkt"
      #:width 1200
      #:height 800
      #:x 50
      #:y 50)