Skip to content

Commit

Permalink
Add temp text printing to the demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsaidi committed Feb 19, 2024
1 parent e08e31b commit dcd6780
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Demo/iOS/EditorScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ import SwiftUI

struct EditorScreen: View {

init() {
// RichTextEditor.standardRichTextFontSize = 100
}

@State
private var text = NSAttributedString.empty

Expand All @@ -34,6 +30,9 @@ struct EditorScreen: View {
}
}
.viewDebug()
.onChange(of: text) {
print($0.string)
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions Demo/macOS/EditorScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ struct EditorScreen: View {
}
}
.viewDebug()
.onChange(of: context.selectedRange) { _ in
print(text.string)
}
}
}

Expand Down

0 comments on commit dcd6780

Please sign in to comment.