Skip to content

Commit

Permalink
Added ability to inspect type of attachment
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdeep committed Sep 22, 2023
1 parent 2bf804c commit ea8ac82
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Proton/Sources/Swift/Attachment/Attachment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ open class Attachment: NSTextAttachment, BoundsObserving {
/// select the attachment i.e. show as highlighted. Tapping the backspace again will delete the attachment. If the value is `false`, the attachment will be deleted on the first backspace itself.
public var selectBeforeDelete = false

public var isBlockType: Bool {
isBlockAttachment
}

public var isInlineType: Bool {
!isBlockAttachment
}

/// Attributed string representation of the `Attachment`. This can be used directly to replace a range of text in `EditorView`
/// ### Usage Example ###
/// ```
Expand Down

0 comments on commit ea8ac82

Please sign in to comment.