|
@@ -4,6 +4,7 @@ import './App.css';
|
|
|
import Select from 'react-select/async'
|
|
|
import {sortableContainer, sortableElement} from 'react-sortable-hoc';
|
|
|
import Dropzone from 'react-dropzone'
|
|
|
+import {buildAST, toReact} from 'mdast';
|
|
|
|
|
|
import { GraphQLClient } from 'graphql-request';
|
|
|
|
|
@@ -427,7 +428,14 @@ const defaultAdminOptions =
|
|
|
fields:{
|
|
|
createdAt: ({children}) => <input value={new Date(+children).toISOString()} />,
|
|
|
url: ({children}) => <a href={children}>{children}</a>,
|
|
|
- color:({children, ...props}) => <input type='color' value={children} {...props}/>
|
|
|
+ color:({children, ...props}) => <input type='color' value={children} {...props}/>,
|
|
|
+ md:({children, field, ...props}) =>
|
|
|
+ <div style={{display: 'flex'}}>
|
|
|
+ <textarea style={{maxWidth: '50%', height: '400px'}} placeholder={field.name} value={children} {...props}/>
|
|
|
+ <div style={{maxWidth: '50%', height: '400px', overflow: 'auto'}}>
|
|
|
+ {toReact(buildAST(children), React)}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
},
|
|
|
|
|
|
models: {
|