Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #101 from matrix-org/release_v_2.14.2
Browse files Browse the repository at this point in the history
release_v_2.14.2
  • Loading branch information
Alfonso Grillo authored Oct 11, 2023
2 parents 6e1a77e + 1e676d9 commit 6e567f6
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ protocol WysiwygTextViewDelegate: AnyObject {
func textView(_ textView: UITextView, didReceivePasteWith provider: NSItemProvider)
}

/// A markdown protocol used to provide additional context to the text view when displaying mentions through the text attachment provider
public protocol MentionDisplayHelper {}

public class WysiwygTextView: UITextView {
/// Internal delegate for the text view.
weak var wysiwygDelegate: WysiwygTextViewDelegate?

private let flusher = WysiwygPillsFlusher()

public var mentionDisplayHelper: MentionDisplayHelper?

override public init(frame: CGRect, textContainer: NSTextContainer?) {
super.init(frame: frame, textContainer: textContainer)
Expand All @@ -63,6 +68,10 @@ public class WysiwygTextView: UITextView {
public func registerPillView(_ pillView: UIView) {
flusher.registerPillView(pillView)
}

public func flushPills() {
flusher.flush()
}

/// Apply given content to the text view. This will temporary disrupt the text view
/// delegate in order to avoid having multiple unnecessary selection frowarded to
Expand Down

0 comments on commit 6e567f6

Please sign in to comment.