forked from coldemo/gallery.code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreact-editor.jsx
More file actions
33 lines (28 loc) · 738 Bytes
/
react-editor.jsx
File metadata and controls
33 lines (28 loc) · 738 Bytes
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
await loadJs('https://unpkg.com/react-editor')
let { Editor } = ReactEditor
let MyCard = styled.div`
margin-top: 20px;
`
let MyEditor = styled(Editor)`
border: solid 1px gray; padding: 4px 10px; overflow: auto;
`
let App = () => {
return (
<div style={{ padding: 20 }}>
<h1>react-editor</h1>
<a target="_blank" href="https://github.com/fritx/react-editor">
https://github.com/fritx/react-editor
</a>
<MyCard>
<div style={{ height: 100 }}>
<MyEditor placeholder="Type something..." />
</div>
</MyCard>
<MyCard>
<div style={{ height: 100 }}>
<MyEditor placeholder="Type something..." />
</div>
</MyCard>
</div>
)
}