Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

선택된 셀의 속성을 설정합니다.


Parameters:

NameTypeDescription
actionNameString액션 이름
propertiesObject

{ border: {Object}, style: {Object}, tableHead: {Object} }


Example:

// 셀 테두리 설정
editor.execCommand('setCellProperties', {
	border: {
		style: 'dotted', // 'solid', 'dotted', 'dashed', 'double'
		width: 5, // 단위 px
		color: { r: 0, g: 0, b: 255 },
		select: [true, true, true, true, true, true] // top, middle, bottom, left, center, right 순서의 선택된 테두리 정보
	}
});

// 제목 셀 설정
editor.execCommand('setCellProperties', {
	tableHead: {
		scope: 'none', // 'none', 'row', 'col'
		tagName: 'th' // 'th', 'td'
	}
});

// 셀 배경색 설정
editor.execCommand('setCellProperties', {
	style: {
		backgroundColor: { r: 255, g: 0, b: 0 }
	}
});

// 세로 정렬 설정
editor.execCommand('setCellProperties', {
	style: {
		verticalAlign: 'middle' // 'top', 'middle', 'bottom'
	}
});

// 가로 정렬 설정
editor.execCommand('setCellProperties', {
	style: {
		align: 'right' // 'left', 'center', 'right', 'justify'
	}
});
  • No labels