Skip to content

Commit 4f0bb11

Browse files
authored
Merge pull request aihehuo#1 from aihehuo/feature-bran-dev
Feature bran dev
2 parents a893aa9 + 3441909 commit 4f0bb11

File tree

11 files changed

+166
-316
lines changed

11 files changed

+166
-316
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,10 @@ const MyApp = () => (
3131

3232
AppRegistry.registerComponent('MyApp', () => MyApp);
3333
```
34+
35+
UPDATE:
36+
## 1.0.1
37+
* Fix the image auto height crop problem.
38+
* Fix fontSize can not be over 14 bug.
39+
* Increase the Text padding size to 2.
40+
* Add dynamic Image height support.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-native-draftjs-renderer",
33
"description": "React Native render for draft.js and react-draft-wysiwyg",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"scripts": {
66
"test": "npm run linter && npm run flow && npm run coverage",
77
"test-coveralls": "npm test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",

sample/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616

1717
import RNDraftJS from '../react-native-draftjs-render';
1818

19-
import data from './sample.js';
19+
import data from './sample3.js';
2020
// import data from './resourceMock.json'
2121

2222
const styles = StyleSheet.create({

sample/src/resourceMock.json

Lines changed: 37 additions & 224 deletions
Original file line numberDiff line numberDiff line change
@@ -1,228 +1,5 @@
11
{
22
"blocks": [
3-
{
4-
"entityRanges": [],
5-
"depth": 0,
6-
"data": {},
7-
"inlineStyleRanges": [],
8-
"text": "Maecenas nec odio",
9-
"type": "header-one",
10-
"key": "ad9sdfdg5"
11-
},
12-
{
13-
"key": "5r867",
14-
"text": "Etiam ultricies nisi vel augue. Sed magna purus, fermentum eu, tincidunt eu, varius ut, felis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Cras dapibus. Sed mollis, eros et ultrices tempus, mauris ipsum aliquam libero, non adipiscing dolor urna a orci.",
15-
"type": "unstyled",
16-
"depth": 0,
17-
"inlineStyleRanges": [
18-
{
19-
"offset": 25,
20-
"length": 5,
21-
"style": "BOLD"
22-
},
23-
{
24-
"offset": 307,
25-
"length": 10,
26-
"style": "BOLD"
27-
},
28-
{
29-
"offset": 241,
30-
"length": 6,
31-
"style": "ITALIC"
32-
}
33-
],
34-
"entityRanges": [],
35-
"data": {}
36-
},
37-
{
38-
"key": "5r864123",
39-
"text": "Etiam ultricies nisi vel augue.",
40-
"type": "unstyled",
41-
"depth": 0,
42-
"inlineStyleRanges": [],
43-
"entityRanges": [
44-
{
45-
"offset": 0,
46-
"length": 5,
47-
"key": 0
48-
}
49-
],
50-
"data": {}
51-
},
52-
{
53-
"key": "5r8641253",
54-
"text": "Etiam ultricies nisi vel augue.",
55-
"type": "unstyled",
56-
"depth": 0,
57-
"inlineStyleRanges": [
58-
{
59-
"offset": 0,
60-
"length": 5,
61-
"style": "BOLD"
62-
}
63-
],
64-
"entityRanges": [],
65-
"data": {}
66-
},
67-
{
68-
"key": "5r8641",
69-
"text": "Etiam ultricies nisi vel augue.",
70-
"type": "unstyled",
71-
"depth": 0,
72-
"inlineStyleRanges": [
73-
{
74-
"offset": 7,
75-
"length": 9,
76-
"style": "BOLD"
77-
},
78-
{
79-
"offset": 7,
80-
"length": 10,
81-
"style": "ITALIC"
82-
}
83-
],
84-
"entityRanges": [],
85-
"data": {}
86-
},
87-
{
88-
"entityRanges": [],
89-
"depth": 0,
90-
"data": {},
91-
"inlineStyleRanges": [],
92-
"text": "Aenean leo ligula porttitor",
93-
"type": "header-two",
94-
"key": "c87fd"
95-
},
96-
{
97-
"entityRanges": [],
98-
"depth": 0,
99-
"data": {},
100-
"inlineStyleRanges": [],
101-
"text": "Morbi vestibulum volutpat",
102-
"type": "header-three",
103-
"key": "c9mft"
104-
},
105-
{
106-
"entityRanges": [],
107-
"depth": 0,
108-
"data": {},
109-
"inlineStyleRanges": [],
110-
"text": "Class aptent taciti sociosqu",
111-
"type": "header-four",
112-
"key": "ad9sdsdfdg5sd"
113-
},
114-
{
115-
"entityRanges": [],
116-
"depth": 0,
117-
"data": {},
118-
"inlineStyleRanges": [],
119-
"text": "Phasellus leo dolor",
120-
"type": "header-five",
121-
"key": "9p0ic"
122-
},
123-
{
124-
"entityRanges": [],
125-
"depth": 0,
126-
"data": {},
127-
"inlineStyleRanges": [],
128-
"text": "Donec vitae orci sed",
129-
"type": "header-six",
130-
"key": "bb6hf"
131-
},
132-
{
133-
"key": "2galv",
134-
"text": "Proin magna. Donec posuere vulputate arcu",
135-
"type": "ordered-list-item",
136-
"depth": 0,
137-
"inlineStyleRanges": [],
138-
"entityRanges": [],
139-
"data": {}
140-
},
141-
{
142-
"key": "cdsdj",
143-
"text": "Etiam feugiat lorem non metus",
144-
"type": "ordered-list-item",
145-
"depth": 0,
146-
"inlineStyleRanges": [],
147-
"entityRanges": [],
148-
"data": {}
149-
},
150-
{
151-
"key": "d725p",
152-
"text": " Curabitur at lacus ac velit ornare lobortis",
153-
"type": "ordered-list-item",
154-
"depth": 0,
155-
"inlineStyleRanges": [],
156-
"entityRanges": [],
157-
"data": {}
158-
},
159-
{
160-
"key": "c9mftj",
161-
"text": "Phasellus a est.",
162-
"type": "unordered-list-item",
163-
"depth": 0,
164-
"inlineStyleRanges": [],
165-
"entityRanges": [],
166-
"data": {}
167-
},
168-
{
169-
"key": "3alra",
170-
"text": "Fusce ac felis sit amet ligula pharetra condimentum",
171-
"type": "unordered-list-item",
172-
"depth": 0,
173-
"inlineStyleRanges": [],
174-
"entityRanges": [],
175-
"data": {}
176-
},
177-
{
178-
"key": "cniqr",
179-
"text": "Suspendisse faucibus a quam loremipsum ligum purus",
180-
"type": "unordered-list-item",
181-
"depth": 0,
182-
"inlineStyleRanges": [
183-
{
184-
"offset": 13,
185-
"length": 6,
186-
"style": "ITALIC"
187-
},
188-
{
189-
"offset": 5,
190-
"length": 30,
191-
"style": "STRIKETHROUGH"
192-
},
193-
{
194-
"offset": 16,
195-
"length": 9,
196-
"style": "BOLD"
197-
}
198-
],
199-
"entityRanges": [
200-
{
201-
"offset": 12,
202-
"length": 8,
203-
"key": 0
204-
}
205-
],
206-
"data": {}
207-
},
208-
{
209-
"key": "8cl9h",
210-
"text": "Suspendisse potenti. Fusce a quam. Etiam ut purus mattis mauris sodales aliquam. Morbi vestibulum volutpat enim. Phasellus nec sem in justo pellentesque facilisis.",
211-
"type": "blockquote",
212-
"depth": 0,
213-
"inlineStyleRanges": [],
214-
"entityRanges": [],
215-
"data": {}
216-
},
217-
{
218-
"entityRanges": [],
219-
"depth": 0,
220-
"data": {},
221-
"inlineStyleRanges": [],
222-
"text": "'code-block': {\n backgroundColor: '#cecece',\n fontFamily: 'Courier New',\n padding: 16,\n},",
223-
"type": "code-block",
224-
"key": "5aaa7ec3"
225-
},
2263
{
2274
"key":"1opin",
2285
"text":"普通文字 加粗文字 斜体文字 下划线文字 中横线文字",
@@ -306,6 +83,42 @@
30683
"entityRanges":[],
30784
"data":{}
30885
},
86+
{
87+
"key":"dbei0",
88+
"text":"30号字体",
89+
"type":"unstyled",
90+
"depth":0,
91+
"inlineStyleRanges":
92+
[
93+
{"offset":0,"length":5,"style":"fontsize-30"}
94+
],
95+
"entityRanges":[],
96+
"data":{}
97+
},
98+
{
99+
"key":"dbei1",
100+
"text":"18号字体",
101+
"type":"unstyled",
102+
"depth":0,
103+
"inlineStyleRanges":
104+
[
105+
{"offset":0,"length":5,"style":"fontsize-18"}
106+
],
107+
"entityRanges":[],
108+
"data":{}
109+
},
110+
{
111+
"key":"dbei0",
112+
"text":"16号字体",
113+
"type":"unstyled",
114+
"depth":0,
115+
"inlineStyleRanges":
116+
[
117+
{"offset":0,"length":5,"style":"fontsize-16"}
118+
],
119+
"entityRanges":[],
120+
"data":{}
121+
},
309122
{
310123
"key":"dbeiv",
311124
"text":"14号字体",
@@ -381,7 +194,7 @@
381194
"depth":0,
382195
"inlineStyleRanges":
383196
[
384-
{"offset":0,"length":9,"style":"fontsize-12"},
197+
{"offset":0,"length":9,"style":"fontsize-30"},
385198
{"offset":0,"length":9,"style":"fontfamily-Georgia"}
386199
],
387200
"entityRanges":[],

sample/src/sample2.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)