     // MARK: - Touch
     
     override open func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
+        guard isWritingMode else { return }
         register(touch: touches.first!)
     }
     
     override open func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
+        if !isWritingMode { isWritingMode = true }
         register(touch: touches.first!)
     }
     
     override open func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
+        guard isWritingMode else { return }
         register(touch: touches.first!, isLast: true)
         manager.process()
     }
     
     override open func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
+        guard isWritingMode else { return }
         register(touch: touches.first!, isLast: true)
         manager.process()
     }

        showCursor(at: node.frame)
    }
    
    @IBAction public func undoAction(_ sender: UIButton?) {
        if let rect = manager.undo() { setNeedsDisplay(rect) }
    }
    
    @IBAction public func redoAction(_ sender: UIButton?) {
        if let rect = manager.redo() { setNeedsDisplay(rect) }
    }
    

    
    private let tapGestureRecognizer = UITapGestureRecognizer()
    private let longPressGestureRecognizer = UILongPressGestureRecognizer()
    
    override public init(frame: CGRect) {
        super.init(frame: frame)
