我正在使用 AntDesign 的 TextArea,当我在其中输入 2-3 个段落,然后按 Enter 以连续显示它时,它会在一个段落中显示所有内容。我想要在文本区域中输入时所做的确切格式。怎么做?
我只是使用文本区域-
<TextArea
rows={2}
style={{ width: "100%" }}
defaultValue={this.state.value}
onClick={this.handleValue}
/>
并显示在右侧-
<div>{this.state.value}</div>
预期的
Hey, how are you doing today? I am fine. i hope your are fine
do give me a call when you are free.
contact - 1234567890
我得到的结果
Hey, how are you doing today? I am fine. i hope your are fine do give me a call when you are free. contact - 1234567890