Skip to content

Commit

Permalink
Fix multi-platform build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsaidi committed Feb 13, 2024
1 parent 4e7e9c8 commit 1a48682
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
10 changes: 10 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,20 @@ Until then, minor updates may remove deprecated features and introduce breaking

This release adds a lot of new `RichTextAction` cases and adjusts the context and coordinator subscription.

### ✨ Features

* `RichTextKeyboardToolbar` has a new configuration to always be shown.
* `RichTextView` has a new theme concept that lets you define its style.

### 💡 Adjustments

* `RichTextColor` `icon` is no longer optional.
* `RichTextColor` has a new `titleKey` property.
* `RichTextCoordinator` now syncs an extra time when text view ends editing.

### 🐛 Bug Fixes

* The library once again builds on visionOS.



Expand Down
3 changes: 2 additions & 1 deletion Sources/RichTextKit/Context/RichTextContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public class RichTextContext: ObservableObject {
Note that the property is read-only and not `@Published`
to avoid redrawing the editor when it changes, which is
done as the user types. We should find a way to observe
it without this happening. The best way to observe this property is to use the raw `text` binding that you pass
it without this happening. The best way to observe this
property is to use the raw `text` binding that you pass
into the text editor. The editor will not redraw if you
change this value from the outside.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Dominik Bucher on 18.01.2024.
//

#if iOS || macOS || os(tvOS)
#if iOS || macOS || os(tvOS) || os(visionOS)
import Foundation

extension RichTextCoordinator {
Expand Down
5 changes: 4 additions & 1 deletion Sources/RichTextKit/RichTextView+Config.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
//
// RichTextView+Config.swift
//
// RichTextKit
//
// Created by Dominik Bucher on 13.02.2024.
//

import Foundation

#if iOS || macOS || os(tvOS) || os(visionOS)
public extension RichTextView.Configuration {

/// Get a standard rich text editor configuration.
static var standard: Self { .init() }
}
#endif

0 comments on commit 1a48682

Please sign in to comment.