RichTextEditViewController.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // RichTextEditViewController.h
  3. // RichTextEditDemo
  4. //
  5. // Created by aron on 2017/7/19.
  6. // Copyright © 2017年 aron. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #define kPostContentNotification @"PostContentNotification"
  10. #define kPostContentDispatchNotification @"PostContentDispatchNotification"
  11. #define kPostContentID @"PostContentID"
  12. #define kPostContentPubID @"PostContentPubID"
  13. @protocol RichTextEditDelegate <NSObject>
  14. - (void)mm_shouldShowAccessoryView:(BOOL)shouldShow;
  15. - (BOOL)mm_shouldCellShowPlaceholder;
  16. - (void)mm_preInsertTextLineAtIndexPath:(NSIndexPath*)actionIndexPath textContent:(NSString*)textContent;
  17. - (void)mm_postInsertTextLineAtIndexPath:(NSIndexPath*)actionIndexPath textContent:(NSString*)textContent;
  18. - (void)mm_preDeleteItemAtIndexPath:(NSIndexPath*)actionIndexPath;
  19. - (void)mm_PostDeleteItemAtIndexPath:(NSIndexPath*)actionIndexPath;
  20. - (void)mm_updateActiveIndexPath:(NSIndexPath*)activeIndexPath;
  21. - (void)mm_reloadItemAtIndexPath:(NSIndexPath*)actionIndexPath;
  22. - (void)mm_uploadFailedAtIndexPath:(NSIndexPath*)actionIndexPath;
  23. - (void)mm_uploadDonedAtIndexPath:(NSIndexPath*)actionIndexPath;
  24. @end
  25. @protocol RichContentPostDelegate <NSObject>
  26. - (void)mm_richContentDidPost:(NSInteger)postID;
  27. @end
  28. @class MMDraftModel;
  29. @interface RichTextEditViewController : UIViewController
  30. - (instancetype)initWithTid:(NSString*)tid;
  31. - (instancetype)initWithDraft:(MMDraftModel*)draft;
  32. @property (nonatomic, weak) id<RichContentPostDelegate> contentPostDelegate;
  33. @end