import { LoadingOutlined } from '@ant-design/icons'; import { connect, mapProps, mapReadPretty } from '@formily/react'; import { Input as AntdInput } from 'antd'; import React from 'react'; import { ReadPretty as InputReadPretty } from '../input'; import { MarkdownVoid } from './Markdown.Void'; import { convertToText, markdown } from './util'; export const Markdown: any = connect( AntdInput.TextArea, mapProps((props: any, field) => { return { autoSize: { maxRows: 10, minRows: 3, }, ...props, suffix: {field?.['loading'] || field?.['validating'] ? : props.suffix}, }; }), mapReadPretty((props) => { let text = convertToText(props.value); let value =
; return ; }), ); Markdown.Void = MarkdownVoid; export default Markdown;