diff options
| author | Ruben Beltran del Rio <jj@r.bdr.sh> | 2026-06-18 19:06:14 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <jj@r.bdr.sh> | 2026-06-18 19:10:49 +0200 |
| commit | 692abd44213b32d507849cec74ec847c994cc257 (patch) | |
| tree | 940e149e69bddfae91202c5dbba6a30f477a280a /README.md | |
| parent | e5e024a5f4c8709cf2a28dc3bfab79d8037516e1 (diff) | |
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -1,7 +1,7 @@ # Norg Keyboard Toolbar This package provides a toolbar you can use whenever you need to edit norg -files. The toolbar provides the following buttons: +files in SwiftUI or UIKit apps. The toolbar provides the following buttons: The heading button creates a new heading, or increases the heading of the current level. See this table for examples. @@ -30,6 +30,8 @@ The code button adds a `@code` and `@end` block. ## Usage +### SwiftUI + Add the package to your project by including the repo URL with Xcode's package manager, and import it: @@ -54,6 +56,24 @@ struct EditorView: View { of the screen if a hardware keyboard is connected.) with the buttons described above. +### UIKit + +Add the package to your project by including the repo URL with Xcode's package +manager, and import it: + +```swift +import UIKit +import NorgKeyboardToolbar + +... + +let textView = UITextView() +textView.installNorgKeyboardAccessory() +``` + +`installNorgKeyboardAccessory` then attaches a toolbar above the keyboard with +the buttons described above. + ## Development A `Justfile` is provided to run common tasks: |