Skip to content

Commit

Permalink
Exposed underlying undoManager via EditorView (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdeep authored Jun 23, 2024
1 parent fc71514 commit 293aec2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Proton/Sources/Swift/Editor/EditorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,11 @@ open class EditorView: UIView {
set { richTextView.textDropDelegate = newValue }
}

/// Returns the nearest shared undo manager in the responder chain.
open override var undoManager: UndoManager? {
get { richTextView.undoManager }
}

private func getAttachmentContentView(view: UIView?) -> AttachmentContentView? {
guard let view = view else { return nil }
if let attachmentContentView = view.superview as? AttachmentContentView {
Expand Down

0 comments on commit 293aec2

Please sign in to comment.