Implement line spacing on post

This commit is contained in:
Angelo Stavrow 2020-11-24 14:35:49 -05:00
parent e884a90582
commit 2e56d62ea8
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -139,11 +139,15 @@ final class CustomTextView: NSView {
layoutManager.addTextContainer(textContainer)
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineSpacing = 8.5
let textView = NSTextView(frame: .zero, textContainer: textContainer)
textView.autoresizingMask = .width
textView.delegate = self.delegate
textView.drawsBackground = false
textView.font = self.font
textView.defaultParagraphStyle = paragraphStyle
textView.isEditable = self.isEditable
textView.isHorizontallyResizable = false
textView.isVerticallyResizable = true