Skip to content

Commit

Permalink
Re-enable disabled preview
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsaidi committed Jan 12, 2024
1 parent 4fa0e2a commit b7b139c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
10 changes: 10 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ Until then, minor updates may remove deprecated features and introduce breaking



## 0.9.6

Thanks to [@DominikBucher12][DominikBucher12], fonts and pasting images behave a lot better than before!

### 💡 Adjustments
* `pasteImage(_:at:moveCursorToPastedContent:)` now uses `true` as default move parameter.



## 0.9.5

Thanks to [@DominikBucher12][DominikBucher12] and [@msrutek-paylocity][msrutek-paylocity], some bugs have been fixed and some formatting adjusted.
Expand Down
2 changes: 0 additions & 2 deletions Sources/RichTextKit/Colors/RichTextColorPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ private struct ColorButtonStyle: ButtonStyle {
}
}

/*
#Preview {

struct Preview: View {
Expand Down Expand Up @@ -190,4 +189,3 @@ private struct ColorButtonStyle: ButtonStyle {

return Preview()
}
*/
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@ public extension RichTextViewComponent {
Paste an image into the text view, at a certain index.
For now, pasting will automatically insert the image as
a jpeg with a 0.7 compression quality. We should expand
this to allow us to define format, compression etc. but
for now this is hard coded and a future TODO.
Pasting images only works on iOS, tvOS and macOS. Other
platform will trigger an assertion failure.
a compressed jpeg. We should expand this to allow us to
define format, compression etc. For now, it's hardcoded
and a future TODO.
- Parameters:
- image: The image to paste.
Expand All @@ -37,7 +34,7 @@ public extension RichTextViewComponent {
func pasteImage(
_ image: ImageRepresentable,
at index: Int,
moveCursorToPastedContent: Bool = false
moveCursorToPastedContent: Bool = true
) {
pasteImages(
[image],
Expand Down
3 changes: 2 additions & 1 deletion Sources/RichTextKit/Fonts/StandardFontSizeProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ public extension StandardFontSizeProvider {
*/
static var standardRichTextFontSize: CGFloat {
get { StandardFontSizeProviderStorage.standardRichTextFontSize }
set { StandardFontSizeProviderStorage.standardRichTextFontSize = newValue }
}
}

private class StandardFontSizeProviderStorage {

static let standardRichTextFontSize: CGFloat = 16
static var standardRichTextFontSize: CGFloat = 16
}

0 comments on commit b7b139c

Please sign in to comment.