mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Add editing menu, enable find/replace, ignore formatted text on paste
This commit is contained in:
parent
89261831bc
commit
7d7fe4134b
@ -94,6 +94,8 @@ struct WriteFreely_MultiPlatformApp: App {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
ToolbarCommands()
|
||||
TextEditingCommands()
|
||||
}
|
||||
|
||||
#if os(macOS)
|
||||
|
@ -140,7 +140,8 @@ final class CustomTextView: NSView {
|
||||
layoutManager.addTextContainer(textContainer)
|
||||
|
||||
let paragraphStyle = NSMutableParagraphStyle()
|
||||
paragraphStyle.lineSpacing = 8.5
|
||||
let lineHeightMultiple: CGFloat = 1.5
|
||||
paragraphStyle.lineHeightMultiple = lineHeightMultiple
|
||||
|
||||
let textView = NSTextView(frame: .zero, textContainer: textContainer)
|
||||
textView.autoresizingMask = .width
|
||||
@ -158,6 +159,9 @@ final class CustomTextView: NSView {
|
||||
textView.minSize = NSSize(width: 0, height: contentSize.height)
|
||||
textView.textColor = NSColor.labelColor
|
||||
textView.allowsUndo = true
|
||||
textView.usesFindPanel = true
|
||||
textView.isAutomaticDashSubstitutionEnabled = false
|
||||
textView.isRichText = false
|
||||
|
||||
return textView
|
||||
}()
|
||||
|
Loading…
Reference in New Issue
Block a user