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

Commit

Permalink
Port raw editor to formik
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixHenninger committed Aug 6, 2020
1 parent c3ca608 commit 5704fbb
Showing 1 changed file with 14 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
import React from 'react'

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

import Editor from '../../../../../../../Editor'
import EditorField from '../../../../../../../Editor/field'

export default () =>
export default ({ name }) =>
<>
<Row form>
<Col>
<div className="border rounded py-2 pr-2" style={{ height: '220px' }}>
<Control.textarea
model=".content"
component={ Editor }
controlProps={{
language: 'html',
height: '100%',
options: {
folding: false,
fontSize: 16,
glyphMargin: false,
lineHeight: 24,
lineNumbers: 'off',
minimap: {
enabled: false,
},
<EditorField
name={ `${ name }.content` }
language="html"
height="100%"
options={{
folding: false,
fontSize: 16,
glyphMargin: false,
lineHeight: 24,
lineNumbers: 'off',
minimap: {
enabled: false,
},
}}
debounce={ 300 }
/>
</div>
</Col>
Expand Down

0 comments on commit 5704fbb

Please sign in to comment.