Skip to content

Commit 45ad6b6

Browse files
committed
updated read me and index
1 parent f413c0c commit 45ad6b6

File tree

2 files changed

+115
-11
lines changed

2 files changed

+115
-11
lines changed

README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,18 @@ The editor offers the following <b>options</b>:
2424
- [x] Font family
2525
- [x] Background color
2626
- [x] Export with .txt, .rtf, .pdf, .json
27-
- [x] Link
27+
- [ ] Link
28+
- [] Image Attachment
29+
- [] Undo/Redo
30+
31+
## What’s Coming Next for RichEditorSwiftUI?🚀
32+
33+
We’re thrilled about the future of RichEditorSwiftUI! 🎉 Check out the exciting features currently in development:
34+
35+
**Link Support:** Easily add hyperlinks to your rich text content.
36+
**Image Drop:** Drag and drop images directly into your editor for seamless integration.
37+
**Undo & Redo:** Effortlessly step forward or backward in your edits for greater control.
38+
Thank you for your support and feedback—it fuels our journey. Stay tuned for these enhancements and more! 🙌
2839

2940
## Screenshots
3041

docs/index.md

+103-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# RichEditorSwiftUI
22

3-
iOS WYSIWYG Rich editor for SwiftUI.
4-
5-
<img src="./docs/sample.gif" height="640" />
3+
![RichEditorSwiftUI (1)](https://github.com/canopas/rich-editor-swiftui/assets/73588408/8c3013ae-8a27-4ebc-a511-51e726825c4b)
64

75
## Features
86

@@ -12,6 +10,65 @@ The editor offers the following <b>options</b>:
1210
- [x] *Italic*
1311
- [x] <u>Underline</u>
1412
- [x] Different Heading
13+
- [x] Text Alignment
14+
- [x] Font size
15+
- [x] Font color
16+
- [x] Font family
17+
- [x] Background color
18+
- [x] Export with .txt, .rtf, .pdf, .json
19+
20+
## Screenshots
21+
22+
<table>
23+
<tr>
24+
<th width="33%" >Editor light</th>
25+
<th width="33%" >Editor dark</th>
26+
</tr>
27+
<tr>
28+
<td><img src="docs/editor_iphone_light.png" /></td>
29+
<td> <img src="docs/editor_iphone_dark.png" /> </td>
30+
</tr>
31+
</table>
32+
33+
<table>
34+
<tr>
35+
<th width="33%" >Toolbar dark</th>
36+
<th width="33%" >Toolbar light</th>
37+
</tr>
38+
<tr align="center">
39+
<td><img src="docs/editor_toolbar_iphone_dark.png" /></td>
40+
<td> <img src="docs/editor_toolbar_iphone_light.png" /> </td>
41+
</tr>
42+
</table>
43+
44+
<table>
45+
<tr>
46+
<th width="100%" >mac Editor light</th>
47+
</tr>
48+
<tr align="center">
49+
<td><img src="docs/editor_mac_light.png" width="70%" /></td>
50+
</tr>
51+
</table>
52+
53+
<table>
54+
<tr>
55+
<th width="100%" >mac Editor dark</th>
56+
</tr>
57+
<tr align="center">
58+
<td> <img src="docs/editor_mac_dark.png" width="70%" /> </td>
59+
</tr>
60+
</table>
61+
62+
## mac Editor video
63+
64+
<div align="center">
65+
<video src="https://github.com/user-attachments/assets/844d8843-41e9-44c2-8a0c-afedaa55c5cb" width="90%"/>
66+
</div>
67+
68+
## iPhone Editor video
69+
<div align="center">
70+
<video src="https://github.com/user-attachments/assets/f99804fb-8612-4e46-b172-66567d1acf91" width="90%"/>
71+
</div>
1572

1673
## Installation
1774

@@ -23,7 +80,7 @@ Once you have your Swift package set up, adding RichEditorSwiftUI as a dependenc
2380

2481
```swift
2582
dependencies: [
26-
.package(url: "https://github.com/canopas/rich-editor-swiftui.git", .upToNextMajor(from: "1.0.0"))
83+
.package(url: "https://github.com/canopas/rich-editor-swiftui.git", .upToNextMajor(from: "1.1.0"))
2784
]
2885
```
2986

@@ -32,7 +89,7 @@ dependencies: [
3289
[CocoaPods][] is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate RichEditorSwiftUI into your Xcode project using CocoaPods, specify it in your Podfile:
3390

3491
target 'YourAppName' do
35-
pod 'RichEditorSwiftUI', '~> 1.0.0'
92+
pod 'RichEditorSwiftUI', '~> 1.1.0'
3693
end
3794

3895
[CocoaPods]: https://cocoapods.org
@@ -42,21 +99,57 @@ dependencies: [
4299
Add the dependency
43100

44101
```
45-
import XYZRichEditor
102+
import RichEditorSwiftUI
46103
```
47104

48-
## How to use ?
105+
## How to use?
49106

50107
```
51108
struct EditorView: View {
52109
@ObservedObject var state: RichEditorState = .init(input: "Hello World")
53-
110+
54111
var body: some View {
55-
RichEditor(state: _state)
56-
.padding(10)
112+
VStack {
113+
#if os(macOS)
114+
RichTextFormat.Toolbar(context: state)
115+
#endif
116+
117+
RichTextEditor(
118+
context: _state,
119+
viewConfiguration: { _ in
120+
121+
}
122+
)
123+
.cornerRadius(10)
124+
125+
#if os(iOS)
126+
RichTextKeyboardToolbar(
127+
context: state,
128+
leadingButtons: { $0 },
129+
trailingButtons: { $0 },
130+
formatSheet: { $0 }
131+
)
132+
#endif
133+
}
134+
.inspector(isPresented: $isInspectorPresented) {
135+
RichTextFormat.Sidebar(context: state)
136+
#if os(macOS)
137+
.inspectorColumnWidth(min: 200, ideal: 200, max: 320)
138+
#endif
139+
}
57140
}
58141
}
59142
```
143+
144+
## Tech stack
145+
146+
RichEditorSwiftUI utilizes the latest Apple technologies and adheres to industry best practices. Below is the current tech stack used in the development process:
147+
148+
- MVVM Architecture
149+
- SwiftUI
150+
- Swift
151+
- Xcode
152+
60153
# Demo
61154
[Sample](https://github.com/canopas/rich-editor-swiftui/tree/main/RichEditorDemo) app demonstrates how simple the usage of the library actually is.
62155

0 commit comments

Comments
 (0)