File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ import Foundation
44/// A collection of constants and metrics shared between the Aztec importer
55/// and the editor.
66///
7- enum Metrics {
7+ public enum Metrics {
88
9- static let defaultIndentation = CGFloat ( 12 )
10- static let maxIndentation = CGFloat ( 200 )
11- static let listTextIndentation = CGFloat ( 16 )
12- static let tabStepInterval = 8
13- static let tabStepCount = 12
14- static let paragraphSpacing = CGFloat ( 6 )
9+ public static var defaultIndentation = CGFloat ( 12 )
10+ public static var maxIndentation = CGFloat ( 200 )
11+ public static var listTextIndentation = CGFloat ( 16 )
12+ public static var tabStepInterval = 8
13+ public static var tabStepCount = 12
14+ public static var paragraphSpacing = CGFloat ( 6 )
1515}
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ private extension LayoutManager {
283283 var resultAttributes = attributes
284284 var indent : CGFloat = 0
285285 if let style = attributes [ . paragraphStyle] as? ParagraphStyle {
286- indent = style. listIndent + Metrics. listTextIndentation
286+ indent = style. listIndent + Metrics. listTextIndentation - ( Metrics . listTextIndentation / 4 )
287287 }
288288
289289 resultAttributes [ . paragraphStyle] = markerParagraphStyle ( indent: indent)
Original file line number Diff line number Diff line change @@ -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
You can’t perform that action at this time.
0 commit comments