Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit 5704fbb

Browse files
Port raw editor to formik
1 parent c3ca608 commit 5704fbb

File tree

1 file changed

+14
-19
lines changed
  • packages/builder/src/components/ComponentOptions/components/Content/Page/components/ItemOptions/components

1 file changed

+14
-19
lines changed

packages/builder/src/components/ComponentOptions/components/Content/Page/components/ItemOptions/components/Raw.js

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
11
import React from 'react'
22

3-
import { Control } from 'react-redux-form'
43
import { Row, Col } from 'reactstrap'
54

6-
import Editor from '../../../../../../../Editor'
5+
import EditorField from '../../../../../../../Editor/field'
76

8-
export default () =>
7+
export default ({ name }) =>
98
<>
109
<Row form>
1110
<Col>
1211
<div className="border rounded py-2 pr-2" style={{ height: '220px' }}>
13-
<Control.textarea
14-
model=".content"
15-
component={ Editor }
16-
controlProps={{
17-
language: 'html',
18-
height: '100%',
19-
options: {
20-
folding: false,
21-
fontSize: 16,
22-
glyphMargin: false,
23-
lineHeight: 24,
24-
lineNumbers: 'off',
25-
minimap: {
26-
enabled: false,
27-
},
12+
<EditorField
13+
name={ `${ name }.content` }
14+
language="html"
15+
height="100%"
16+
options={{
17+
folding: false,
18+
fontSize: 16,
19+
glyphMargin: false,
20+
lineHeight: 24,
21+
lineNumbers: 'off',
22+
minimap: {
23+
enabled: false,
2824
},
2925
}}
30-
debounce={ 300 }
3126
/>
3227
</div>
3328
</Col>

0 commit comments

Comments
 (0)