Description

여러 줄을 입력을 받을 수 있는 텍스트 편집기이다.
Ctrl+Enter로 줄 나누기를 할 수 있다.

Properties

maxLength
Type: Number
Default: 0
사용자가 입력할 수 있는 문자의 최대 개수. 0으로 지정하면 제한이 없다.

textCase
Type: String
Default: TextInputCase.DEFAULT
편집기에 입력되는 문자를 자동으로 대소문자로 변경한다. TextInputCase에 지정할 수 있는 값들이 선언되어 있다. TextInputCase.DEFAULT로 지정하면 컬럼의 textInputCase에 지정한 값을 따르게 된다.

minHeight
Type: Number
Default: 0
멀티라인셀 에디터가 펼쳐졌을때의 최소 높이를 지정한다.

altEnterNewLine
Type: Boolean
Default: false
true인경우 ctrl+enter는 무시되고 alt+enter또는 shift+Enter로 newLine이 된다.
RealGridJS 1.1.33버전 이상부터 지원한다.

Examples

function setColumns(grid) {
    var columns = [{
        name: "col1",
        fieldName: "field1",
        header : {
            text: "직업"
        },
        width : 60,
        editor: {
            type: "multiline",
            textCase: "upper",
            maxLength: 5
        }           
    }...

    }]

    grid.setColumns(columns);
}

그리드의 직업 컬럼은 ctrl + enter키로 여러 줄로 입력이 가능하고, 입력할 수 있는 문자는 5개이며, 편집기에 입력되는 문자는 모두 대문자로 변경한다.