Files
markdownlive/NSTextView+EditPlainTextWithUndo.h
2012-08-31 16:09:45 +02:00

25 lines
774 B
Objective-C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// NSTextView+EditPlainTextWithUndo.h
// MarkdownLive
//
// Created by Jan Weiß on 31.08.12. Some rights reserved: <http://opensource.org/licenses/mit-license.php>
//
// Based on DrewThalers post at http://www.cocoadev.com/index.pl?UndoSupportForNSTextStorage
#import <Foundation/Foundation.h>
@interface NSTextView (EditPlainTextWithUndo)
- (void)setSelectedRangeWithUndo:(NSRange)range;
- (void)setSelectedRangesWithUndo:(NSArray *)ranges;
- (BOOL)setText:(NSString *)string;
- (BOOL)replaceCharactersInRange:(NSRange)range withText:(NSString *)string;
- (BOOL)insertText:(NSString *)string atIndex:(NSUInteger)index;
- (BOOL)insertText:(NSString *)string atIndex:(NSUInteger)index checkIndex:(BOOL)checkIndex;
- (BOOL)insertText:(NSString *)string;
@end