Skip to content

Commit b7b139c

Browse files
committed
Re-enable disabled preview
1 parent 4fa0e2a commit b7b139c

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

RELEASE_NOTES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ Until then, minor updates may remove deprecated features and introduce breaking
66

77

88

9+
## 0.9.6
10+
11+
Thanks to [@DominikBucher12][DominikBucher12], fonts and pasting images behave a lot better than before!
12+
13+
### 💡 Adjustments
14+
15+
* `pasteImage(_:at:moveCursorToPastedContent:)` now uses `true` as default move parameter.
16+
17+
18+
919
## 0.9.5
1020

1121
Thanks to [@DominikBucher12][DominikBucher12] and [@msrutek-paylocity][msrutek-paylocity], some bugs have been fixed and some formatting adjusted.

Sources/RichTextKit/Colors/RichTextColorPicker.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ private struct ColorButtonStyle: ButtonStyle {
149149
}
150150
}
151151

152-
/*
153152
#Preview {
154153

155154
struct Preview: View {
@@ -190,4 +189,3 @@ private struct ColorButtonStyle: ButtonStyle {
190189

191190
return Preview()
192191
}
193-
*/

Sources/RichTextKit/Component/RichTextViewComponent+Pasting.swift

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@ public extension RichTextViewComponent {
2222
Paste an image into the text view, at a certain index.
2323

2424
For now, pasting will automatically insert the image as
25-
a jpeg with a 0.7 compression quality. We should expand
26-
this to allow us to define format, compression etc. but
27-
for now this is hard coded and a future TODO.
28-
29-
Pasting images only works on iOS, tvOS and macOS. Other
30-
platform will trigger an assertion failure.
25+
a compressed jpeg. We should expand this to allow us to
26+
define format, compression etc. For now, it's hardcoded
27+
and a future TODO.
3128

3229
- Parameters:
3330
- image: The image to paste.
@@ -37,7 +34,7 @@ public extension RichTextViewComponent {
3734
func pasteImage(
3835
_ image: ImageRepresentable,
3936
at index: Int,
40-
moveCursorToPastedContent: Bool = false
37+
moveCursorToPastedContent: Bool = true
4138
) {
4239
pasteImages(
4340
[image],

Sources/RichTextKit/Fonts/StandardFontSizeProvider.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ public extension StandardFontSizeProvider {
4242
*/
4343
static var standardRichTextFontSize: CGFloat {
4444
get { StandardFontSizeProviderStorage.standardRichTextFontSize }
45+
set { StandardFontSizeProviderStorage.standardRichTextFontSize = newValue }
4546
}
4647
}
4748

4849
private class StandardFontSizeProviderStorage {
4950

50-
static let standardRichTextFontSize: CGFloat = 16
51+
static var standardRichTextFontSize: CGFloat = 16
5152
}

0 commit comments

Comments
 (0)