MMRichTextConfig.m 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // MMRichTextConfig.m
  3. // RichTextEditDemo
  4. //
  5. // Created by aron on 2017/7/20.
  6. // Copyright © 2017年 aron. All rights reserved.
  7. //
  8. #import "MMRichTextConfig.h"
  9. #import <UIKit/UIKit.h>
  10. #import "UtilMacro.h"
  11. @implementation MMRichTextConfig
  12. + (instancetype)sharedInstance{
  13. static dispatch_once_t once;
  14. static id __singleton__;
  15. dispatch_once( &once, ^{ __singleton__ = [[self alloc] init]; } );
  16. return __singleton__;
  17. }
  18. - (instancetype)init
  19. {
  20. self = [super init];
  21. if (self) {
  22. _editAreaLeftPadding = convertLength(20);
  23. _editAreaRightPadding = convertLength(20);
  24. _editAreaTopPadding = convertLength(7.5f);
  25. _editAreaBottomPadding = convertLength(7.5f);
  26. _editAreaWidth = [UIScreen mainScreen].bounds.size.width;
  27. _imageDeltaWidth = 10.0f;
  28. _editTitleAreaLeftPadding = convertLength(20);
  29. _editTitleAreaRightPadding = convertLength(20);
  30. _editTitleAreaTopPadding = convertLength(17);
  31. _editTitleAreaBottomPadding = convertLength(17);
  32. _titleMaxCount = 200;
  33. _maxImageCount = 10;
  34. _maxTextContentCount = 20000;
  35. _minImageContentCellHeight = convertLength(90);
  36. _defaultEditContentFont = [UIFont systemFontOfSize:14];
  37. _defaultEditTitleFont = [UIFont systemFontOfSize:16];
  38. }
  39. return self;
  40. }
  41. @end