forked from Automattic/simplenote-macos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SPTextLinkifier.h
31 lines (24 loc) · 949 Bytes
/
SPTextLinkifier.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// SPTextLinkifier.h
// Simplenote
//
// Created by Jorge Leandro Perez on 08/27/15.
// Copyright (c) 2015 Automattic. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
* @class SPTextLinkifier
* @brief The purpose of this class is to handle Text Linkification for a given NSTextView Instance.
* We need to do this, by hand, since NSTextView's Data Detectors have an extremely poor performance
* when dealing with huge documents, full of links.
*/
@interface SPTextLinkifier : NSObject
@property (nonatomic, strong, readonly) NSTextView *textView;
@property (nonatomic, assign, readwrite) BOOL enabled;
/**
* @details Returns a new Linkifier Instance
* @param textView The TextView that requires Linkification Services.
* @returs The new Text Linkifier Instance.
*/
+ (SPTextLinkifier *)linkifierWithTextView:(NSTextView *)textView;
@end