mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 17:19:11 +08:00
c5a043b4c8
+ add `getSuggestionContainer` callback function, which allow users modify the container element of suggestions dropdown. + the suggestions dropdown will mount on `document.body` defaultly, instead of on editor. + close #3588
33 lines
519 B
Markdown
33 lines
519 B
Markdown
---
|
|
order: 5
|
|
title:
|
|
zh-CN: 多行
|
|
en-US: Multi-lines Mode
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
多行模式,多行模式必须指定高度。
|
|
|
|
## en-US
|
|
|
|
Multi lines mode.
|
|
|
|
````jsx
|
|
import { Mention } from 'antd';
|
|
const { toString } = Mention;
|
|
|
|
function onChange(editorState) {
|
|
console.log(toString(editorState));
|
|
}
|
|
|
|
ReactDOM.render(
|
|
<Mention
|
|
style={{ width: '100%', height: 100 }}
|
|
onChange={onChange}
|
|
suggestions={['afc163', 'benjycui', 'yiminghe', 'jljsj33', 'dqaria', 'RaoHai']}
|
|
multiLines
|
|
/>
|
|
, mountNode);
|
|
````
|