Page tree

Versions Compared

Key

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

...

Code Block
languagejs
themeEmacs
// Set cell border style
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
순서의 선택된 테두리 정보
	}
});

// Set cell to table header
editor.execCommand('setCellProperties', {
	tableHead: {
		scope: 'none', // 'none', 'row', 'col'
		tagName: 'th' // 'th', 'td'
	}
});

// Set cell background color
editor.execCommand('setCellProperties', {
	style: {
		backgroundColor: { r: 255, g: 0, b: 0 }
	}
});

// Set vertical align of cell
editor.execCommand('setCellProperties', {
	style: {
		verticalAlign: 'middle' // 'top', 'middle', 'bottom'
	}
});

// Set horizontal align of cell
editor.execCommand('setCellProperties', {
	style: {
		align: 'right' // 'left', 'center', 'right', 'justify'
	}
});

...