@@ -65,7 +65,7 @@ class EditorDemoController: UIViewController {
6565
6666 private func setupHTMLTextView( _ textView: UITextView ) {
6767 let accessibilityLabel = NSLocalizedString ( " HTML Content " , comment: " Post HTML content " )
68- self . configureDefaultProperties ( for : textView, accessibilityLabel: accessibilityLabel)
68+ self . configureDefaultProperties ( htmlTextView : textView, accessibilityLabel: accessibilityLabel)
6969
7070 textView. isHidden = true
7171 textView. delegate = self
@@ -171,6 +171,8 @@ class EditorDemoController: UIViewController {
171171 view. addSubview ( titleTextView)
172172 view. addSubview ( titlePlaceholderLabel)
173173 view. addSubview ( separatorView)
174+ Aztec . Metrics. listTextIndentation = 24
175+ editorView. richTextView. textContainer. lineFragmentPadding = 0
174176 // color setup
175177 if #available( iOS 13 . 0 , * ) {
176178 view. backgroundColor = UIColor . systemBackground
@@ -325,7 +327,22 @@ class EditorDemoController: UIViewController {
325327 }
326328
327329
328- private func configureDefaultProperties( for textView: UITextView , accessibilityLabel: String ) {
330+ private func configureDefaultProperties( for textView: TextView , accessibilityLabel: String ) {
331+ textView. accessibilityLabel = accessibilityLabel
332+ textView. font = Constants . defaultContentFont
333+ textView. keyboardDismissMode = . interactive
334+ if #available( iOS 13 . 0 , * ) {
335+ textView. textColor = UIColor . label
336+ textView. defaultTextColor = UIColor . label
337+ } else {
338+ // Fallback on earlier versions
339+ textView. textColor = UIColor ( red: 0x1A / 255.0 , green: 0x1A / 255.0 , blue: 0x1A / 255.0 , alpha: 1 )
340+ textView. defaultTextColor = UIColor ( red: 0x1A / 255.0 , green: 0x1A / 255.0 , blue: 0x1A / 255.0 , alpha: 1 )
341+ }
342+ textView. linkTextAttributes = [ . foregroundColor: UIColor ( red: 0x01 / 255.0 , green: 0x60 / 255.0 , blue: 0x87 / 255.0 , alpha: 1 ) , NSAttributedString . Key. underlineStyle: NSNumber ( value: NSUnderlineStyle . single. rawValue) ]
343+ }
344+
345+ private func configureDefaultProperties( htmlTextView textView: UITextView , accessibilityLabel: String ) {
329346 textView. accessibilityLabel = accessibilityLabel
330347 textView. font = Constants . defaultContentFont
331348 textView. keyboardDismissMode = . interactive
0 commit comments