Skip to content

Commit a7db796

Browse files
committed
updated json and samples
1 parent 6544197 commit a7db796

File tree

8 files changed

+103
-48
lines changed

8 files changed

+103
-48
lines changed

RichEditorDemo/RichEditorDemo/Sample_json.json

Lines changed: 103 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,177 @@
11
{
22
"spans": [
33
{
4-
"insert": "RichEditor",
4+
"insert": "RichEditorSwiftUI",
55
"attributes": {
6-
"bold": true,
7-
"header": 1
6+
"color": "#FF9500",
7+
"size": 24,
8+
"font": "Academy Engraved LET"
89
}
910
},
1011
{
11-
"insert": "\niOS ",
12-
"attributes": {}
12+
"attributes": {},
13+
"insert": "\n\nIt’s Support "
1314
},
1415
{
15-
"insert": "RichEditorSwiftUI ",
16+
"insert": "bold",
1617
"attributes": {
17-
"bold": true,
18-
"italic": true
18+
"bold": true
1919
}
2020
},
2121
{
22-
"insert": "Rich editor for ",
23-
"attributes": {}
22+
"attributes": {},
23+
"insert": ", "
24+
},
25+
{
26+
"attributes": {
27+
"italic": true
28+
},
29+
"insert": "italic"
30+
},
31+
{
32+
"attributes": {},
33+
"insert": ", "
2434
},
2535
{
26-
"insert": "SwiftUI.\n\n",
2736
"attributes": {
28-
"bold": true,
2937
"underline": true
30-
}
38+
},
39+
"insert": "underline"
3140
},
3241
{
33-
"insert": "Features",
42+
"attributes": {},
43+
"insert": " and "
44+
},
45+
{
46+
"insert": "striketrhough",
3447
"attributes": {
35-
"bold": true,
36-
"header": 3
48+
"strike": true
3749
}
3850
},
3951
{
40-
"insert": "\nThe editor offers the following ",
41-
"attributes": {}
52+
"attributes": {},
53+
"insert": " formats.\n\nWe have different headings\n"
4254
},
4355
{
44-
"insert": "options:\n",
56+
"insert": "Heading 1\n",
4557
"attributes": {
46-
"bold": true,
47-
"italic": true,
48-
"underline": true
58+
"header": 1
4959
}
5060
},
5161
{
52-
"insert": "\n",
53-
"attributes": {}
62+
"insert": "Heading 2",
63+
"attributes": {
64+
"header": 2
65+
}
66+
},
67+
{
68+
"attributes": {},
69+
"insert": "\n"
5470
},
5571
{
56-
"insert": "Bold\n",
72+
"insert": "Heading 3\n",
5773
"attributes": {
58-
"bold": true
74+
"header": 3
5975
}
6076
},
6177
{
62-
"insert": "Italic\n",
78+
"insert": "Heading 4\n",
6379
"attributes": {
64-
"italic": true
80+
"header": 4
6581
}
6682
},
6783
{
68-
"insert": "Underline\n",
84+
"insert": "Heading 5\n",
6985
"attributes": {
70-
"underline": true
86+
"header": 5
87+
}
88+
},
89+
{
90+
"insert": "Heading 6\n",
91+
"attributes": {
92+
"header": 6
7193
}
7294
},
7395
{
74-
"insert": "Different ",
96+
"insert": "\nHere we have ",
7597
"attributes": {}
7698
},
7799
{
78-
"insert": "Headings\n\n",
79100
"attributes": {
80-
"bold": true,
81-
"italic": true,
82-
"underline": true
101+
"size": 24
102+
},
103+
"insert": "large"
104+
},
105+
{
106+
"attributes": {},
107+
"insert": " and "
108+
},
109+
{
110+
"attributes": {
111+
"size": 10
112+
},
113+
"insert": "small"
114+
},
115+
{
116+
"attributes": {},
117+
"insert": " text and "
118+
},
119+
{
120+
"insert": "custom fonts",
121+
"attributes": {
122+
"font": "ChalkboardSE-Light",
123+
"color": "#007AFF"
83124
}
84125
},
85126
{
86-
"insert": "\n",
127+
"insert": " as well.\n\nYou can align text differently\nHere is the left align\n",
87128
"attributes": {}
88129
},
89130
{
90-
"insert": "Credits",
91131
"attributes": {
92-
"bold": true,
93-
"header": 3
132+
"align": "center"
133+
},
134+
"insert": "This is center align\n"
135+
},
136+
{
137+
"insert": "This is right align\n",
138+
"attributes": {
139+
"align": "right"
94140
}
95141
},
96142
{
97-
"insert": "\n\n",
143+
"attributes": {},
144+
"insert": "\nDifferent font "
145+
},
146+
{
147+
"insert": "color",
148+
"attributes": {
149+
"color": "#34C759"
150+
}
151+
},
152+
{
153+
"insert": " and ",
98154
"attributes": {}
99155
},
100156
{
101-
"insert": "RichEditor ",
157+
"insert": "background",
102158
"attributes": {
103-
"bold": true
159+
"background": "#32ADE6"
104160
}
105161
},
106162
{
107-
"insert": "for SwiftUI is developed and maintained by the ",
163+
"insert": "\n\nThank You! Team ",
108164
"attributes": {}
109165
},
110166
{
111-
"insert": "Canopas Team.",
112167
"attributes": {
113168
"bold": true,
114-
"italic": true,
115-
"underline": true
116-
}
169+
"color": "#F67C8E"
170+
},
171+
"insert": "Canopas"
117172
},
118173
{
119-
"insert": "\n\nThank You! 😊\n\n",
174+
"insert": " 😊",
120175
"attributes": {}
121176
}
122177
]

docs/editor_iphone_dark.png

51.1 KB
Loading

docs/editor_iphone_light.png

55.8 KB
Loading

docs/editor_mac_dark.png

38.6 KB
Loading

docs/editor_mac_light.png

45.1 KB
Loading
62.1 KB
Loading
65 KB
Loading
4.51 MB
Binary file not shown.

0 commit comments

Comments
 (0)