Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

선택된 테이블의 속성을 설정합니다Set table properties of the table in which the caret or selection is positioned.


Parameters:

NameTypeDescription
actionNameString액션 이름'setTableProperites' table properties setting API
propertiesObject

{ style: {Object}, caption: {Object}, head: {Object}, ..}

...

Code Block
languagejs
themeEmacs
// Set 제목table 설정caption
editor.execCommand('setTableProperties', {
	caption: {
		position: 'top',   // 'none', 'top', 'bottom'
		text: '표의 제목'
	}
});

// 제목Set table 설정header
editor.execCommand('setTableProperties', {
	head: {
		scope: false,
		value: 'row' // 'none', 'row', 'col', 'both'
	}
});

// Set 테두리table 스타일border 설정style
editor.execCommand('setTableProperties', {
	style: {
		border: {
			style: 'dotted', // 'solid', 'dotted', 'dashed', 'double'
			width: 10, // 단위 px
			color: { r: 255, g: 0, b: 0 }
		}
	}
});

// 표 너비, 높이 설정Set table width and height
editor.execCommand('setTableProperties', {
	style: {
		width: { value: 800, unit: 'px' },
		height: { value: 300, unit: 'px' }
	}
});

// Set  정렬table 설정align
editor.execCommand('setTableProperties', {
	style: {
		blockAlign: 'center' // 'left', 'center', 'right'
	}
});

// Set 기타table 스타일other 설정properties
editor.execCommand('setTableProperties', {
	style: {
		tableLayout: 'auto', // 'auto', 'fixed'
		display: 'table' // 'table', 'inline-table'
	}
});

...