forked from ant-design/md-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreview.tsx
280 lines (236 loc) · 10.3 KB
/
preview.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
import { MarkdownEditor } from '@ant-design/md-editor';
import { Tooltip } from 'antd';
import React, { useEffect, useState } from 'react';
const defaultValue = `<!-- {"MarkdownType": "report", "id": "8", "section_ids": " [15, 16, 17] "} -->
# 腾讯研究报告
<!-- {"MarkdownType": "section", "id": "15" } -->
## 创始人
腾讯,全称深圳市腾讯计算机系统有限公司,是由五位创始人共同创立的,他们是马化腾、张志东、许晨晔、陈一丹和曾李青。 以下是关于这些创始人的详细信息: 马化腾 马化腾,1971 年 10 月 29 日出生于广东省东方县(现海南省东方市)八所港,广东汕头人,汉族,无党派人士。他毕业于深圳大学电子工程系计算机专业。马化腾是腾讯科技(深圳)有限公司的创始人、董事会主席、首席执行官,并曾是中华人民共和国第十二、十三届全国人民代表大会代表 。马化腾在 1998 年 11 月 11 日与合伙人共同注册成立了腾讯,并在 2004 年 6 月 16 日带领腾讯在香港联合交易所有限公司主板上市。 张志东 张志东,马化腾的同学,被称为 QQ 之父。他的计算机技术非常出色,曾是深圳大学最拔尖的学生之一。张志东在腾讯担任 CTO,并在 2014 年 9 月离职,转任腾讯公司终身荣誉顾问及腾讯学院荣誉院长等职位 。
## 部门
- 腾讯科技(深圳)有限公司
- 腾讯学院
- 腾讯云
- 腾讯金融
- 腾讯游戏
- 腾讯广告
- 腾讯社交网络
- 微信
- QQ
- QQ 音乐
- QQ 空间
- 腾讯其他业务
## 战略
- [x] [张志东](https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png?param=3&id=2) Write the press release
- [ ] Update the website
- [ ] Contact the media
<!-- {"MarkdownType": "section", "id": "16" } -->
## 表格
| 业务 | 2021Q1 | 2021Q2 | 2021Q3 | 2021Q4 | 2022Q1 | 2022Q2 | 2022Q3 | 2022Q4 | 2023Q1 | 2023Q2 | 2023Q3 | 2023Q4 |
| ------------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |
| 收入 | 135,303 | 138,259 | 142,368 | 144,188 | 135,471 | 134,034 | 140,093 | 144,954 | 149,986 | 149,208 | 154,625 | 155,200 |
| 社交网络收入增值服务 | 72,443 | 72,013 | 75,203 | 71,913 | 72,738 | 71,683 | 72,727 | 70,417 | 79,337 | 74,211 | 75,748 | 69,100 |
| 网络游戏 | 43,600 | 43,000 | 44,900 | 42,800 | 43,600 | 42,500 | na | na | na | 44,500 | 46,000 | 40,900 |
| 社交网络收入 | 28,800 | 29,000 | 30,300 | 29,100 | 29,100 | 29,200 | na | na | na | 29,700 | 29,700 | 28,200 |
| 网络广告 | 21,820 | 22,833 | 22,495 | 21,518 | 17,988 | 18,638 | 21,443 | 24,660 | 20,964 | 25,003 | 25,721 | 29,794 |
| 其他 | 41,040 | 43,413 | 44,670 | 50,757 | 44,745 | 43,713 | 45,923 | 49,877 | 49,685 | 49,994 | 53,156 | 54,379 |
| 金融科技 | 39,028 | 41,892 | 43,317 | 47,958 | 42,768 | 42,208 | 44,844 | 47,244 | 48,701 | 48,635 | 52,048 | 52,435 |
| 云 | 62,012 | 1,521 | 1,353 | 2,799 | 1,977 | 1,505 | 1,079 | 2,633 | 984 | 1,359 | 1,108 | 1,944 |
## 链接
<!-- {"type": "card","icon":"https://www.zhihu.com/favicon.ico?x-oss-process=image%2Fquality%2Cq_10","title":"《影之刃零》发售销量会破五百万吗? - 知乎","description":"这游戏的名字就直接扣2分,什么日系玩意。这游戏又是古龙风格的,作为金庸粉,不减分就不错了。看了下预…" } -->
[腾讯官网](https://www.zhihu.com/question/665438199/answer/3625311124 "腾讯官网")
[腾讯官网](https://www.zhihu.com/question/665438199/answer/3625311124 "腾讯官网")
## Description
| 业务 | 2021Q1 | 2021Q2 | 2021Q3 | 2021Q4 | 2022Q1 | 2022Q2 | 2022Q3 | 2022Q4 | 2023Q1 | 2023Q2 | 2023Q3 | 2023Q4 |
| ------------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- | ------- |
| 收入 | 135,303 | 138,259 | 142,368 | 144,188 | 135,471 | 134,034 | 140,093 | 144,954 | 149,986 | 149,208 | 154,625 | 155,200 |
## 图表
<!-- {"chartType": "bar", "x":"业务", "y":"2021Q1"} -->
| 业务 | 2021Q1 | 2021Q2 | 2021Q3 | 2021Q4 | 2022Q1 |
| ------------- | ------- | ------- | ------- | ------- | ------- |
| 收入 | 135,303 | 138,259 | 142,368 | 144,188 | 135,471 |
| 增值服务 | 72,443 | 72,013 | 75,203 | 71,913 | 72,738 |
| 网络游戏 | 43,600 | 43,000 | 44,900 | 42,800 | 43,600 |
| 社交网络收入 | 28,800 | 29,000 | 30,300 | 29,100 | 29,100 |
| 网络广告 | 21,820 | 22,833 | 22,495 | 21,518 | 17,988 |
| 其他 | 41,040 | 43,413 | 44,670 | 50,757 | 44,745 |
| 金融科技 | 39,028 | 41,892 | 43,317 | 47,958 | 42,768 |
| 云 | 162,012 | 111,521 | 111,353 | 112,799 | 111,977 |
## 图片

## 视频

## 附件

## 引用
上上任的武汉大学校长是李晓红。[^1][^2]
| 业务 | 2021Q1 | 2021Q2 | 2021Q3 | 2021Q4 | 2022Q1 |
| ------------- | ------- | ------- | ------- | ------- | ------- |
| 收入 | 135,303 | 138,259 | 142,368 | 144,188 | 135,471 |
| 增值服务 | 72,443 | 72,013 | 75,203 | 71,913 | 72,738 |
| 网络游戏 | 43,600 | 43,000 | 44,900 | 42,800 | 43,600 |
| 社交网络收入 | 28,800 | 29,000 | 30,300 | 29,100 | 29,100 |
| 网络广告 | 21,820 | 22,833 | 22,495 | 21,518 | 17,988 |
| 其他 | 41,040 | 43,413 | 44,670 | 50,757 | 44,745 |
| 金融科技 | 39,028 | 41,892 | 43,317 | 47,958 | 42,768 |
| 云 | 162,012 | 111,521 | 111,353 | 112,799 | 111,977 |
> 数据来自 [^3]
[^1]:remarkjs.md
[^2]:remarkjs.md
## 表单
\`\`\`schema
[
{
"title": "标题",
"dataIndex": "title",
"formItemProps": {
"rules": [{ "required": true, "message": "此项为必填项" }]
},
"width": "md"
}
]
\`\`\`
## 删除线
~~腾讯六大事业群腾讯六大事业群腾讯六大事业群~~
`;
export default () => {
const editorRef = React.useRef<any>();
const [list, setList] = useState([
{
selection: {
anchor: { path: [2, 0], offset: 283 },
focus: { path: [2, 0], offset: 292 },
},
path: [2, 0],
time: 1735924079099,
id: 1735924079099,
content: '你好',
anchorOffset: 283,
focusOffset: 292,
refContent: '日带领腾讯在香港联',
commentType: 'comment',
},
{
id: 1,
selection: {
anchor: { path: [2, 0], offset: 283 },
focus: { path: [2, 0], offset: 292 },
},
path: [2, 0],
anchorOffset: 283,
focusOffset: 292,
user: {
name: '张志东',
},
time: 1629340800000,
content: '深圳大学是中国最好的大学之一,拥有很多优秀的学生。',
refContent:
'张志东在腾讯担任 CTO,并在 2014 年 9 月离职,转任腾讯公司终身荣誉顾问及腾讯学院荣誉院长等职位 。',
commentType: 'comment',
},
{
id: 2,
selection: {
anchor: { path: [2, 0], offset: 283 },
focus: { path: [2, 0], offset: 292 },
},
path: [2, 0],
anchorOffset: 283,
focusOffset: 292,
user: {
name: '张志东',
},
time: 1629340800000,
content:
'张志东, 马化腾的同学,被称为 QQ 之父。他的计算机技术非常出色,曾是深圳大学最拔尖的学生之一。',
refContent:
'张志东在腾讯担任 CTO,并在 2014 年 9 月离职,转任腾讯公司终身荣誉顾问及腾讯学院荣誉院长等职位 。',
commentType: 'comment',
},
]);
useEffect(() => {
// @ts-ignore
window.editorRef = editorRef;
}, []);
return (
<MarkdownEditor
editorRef={editorRef}
width={'100vw'}
height={'100vh'}
reportMode
fncProps={{
render: (props, _) => {
return <Tooltip title={props.children}>{_}</Tooltip>;
},
}}
comment={{
enable: true,
commentList: list,
loadMentions: async () => {
return [
{
name: '张志东',
id: '1',
avatar:
'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
},
{
name: '马化腾',
id: '2',
avatar:
'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
},
];
},
onDelete: async (id) => {
setList(list.filter((i) => i.id !== id));
},
onSubmit: async (id, data) => {
console.log(id, data);
setList([
...list,
{
...data,
user: {
name: '张志东',
avatar:
'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
},
id: list.length + 1,
time: new Date().getTime(),
} as any,
]);
},
}}
image={{
upload: async (fileList) => {
return new Promise((resolve) => {
const file = fileList[0];
if (typeof file === 'string') {
fetch(file)
.then((res) => res.blob())
.then((blob) => {
console.log(blob);
const url = URL.createObjectURL(blob);
resolve(url);
});
} else {
const url = URL.createObjectURL(file);
resolve(url);
}
});
},
}}
toolBar={{
hideTools: ['H1'],
}}
insertAutocompleteProps={{
optionsRender: (options) => {
return options.filter((item) => {
return item.key !== 'head1';
});
},
}}
initValue={defaultValue}
/>
);
};