import React from 'react'; import { connect, mapProps, mapReadPretty } from '@formily/react'; import { Input as AntdInput } from 'antd'; import { InputProps, TextAreaProps } from 'antd/lib/input'; import { Display } from '../display'; import { LoadingOutlined } from '@ant-design/icons'; import micromark from 'micromark'; export const Markdown = connect( AntdInput.TextArea, mapProps((props: any, field) => { return { ...props, suffix: ( {field?.['loading'] || field?.['validating'] ? ( ) : ( props.suffix )} ), }; }), mapReadPretty((props) => { let text = props.value; let value = (
); return ; }), ); export default Markdown;