Page tree

Versions Compared

Key

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

...

editor.table.template.styles 설정

KeyType설명
template nameObject

표 템플릿 스타일을 정의합니다.

template name은 String 타입으로 설정할 수 있습니다.
기존 템플릿 스타일을 덮어 씌우거나, 새로 지정할 수 있습니다.

















row

Object

행들의 스타일을 정의합니다.


head

Object

머리행의 스타일을 정의합니다.


index

Number

스타일을 적용할 행을 선택합니다.

ex) 0 → 첫번째 행에 스타일이 적용됩니다.

style

Object

표현할 스타일을 정의합니다.


color

String

글자색을 지정합니다.

ex) 'red'
ex) 'rgb(255, 0, 0)'
ex) '#FF0000'

backgroundColor

String

배경색을 지정합니다.

ex) 'red'
ex) 'rgb(255, 0, 0)'
ex) '#FF0000'

borders

Object

테두리의 스타일을 정의합니다.


top

Object

border-top 정의


type

String

테두리 스타일을 지정합니다.

지원하는 타입: [none | dotted | dashed | solid | double]

ex) 'solid'

width

Number

테두리 두께를 px 단위로 지정합니다.

color

String

테두리 색상을 지정합니다.

ex) 'red'
ex) 'rgb(255, 0, 0)'
ex) '#FF0000'

bottomObject

형태는 top과 같습니다.

설정하지 않으면 top이 적용됩니다.

leftObject

형태는 top과 같습니다.

설정하지 않으면 top이 적용됩니다.

rightObject

형태는 top과 같습니다.

설정하지 않으면 left → top 순서대로 적용됩니다.

highlight

Object

강조행의 스타일을 정의합니다.

형태는 head와 같습니다.


index

isEven

Number

스타일을 적용할 홀수/짝수 행을 선택합니다짝수행에 스타일을 적용할 지 여부입니다.

0true: 홀수 짝수 행에 스타일을 적용합니다.
1false: 짝수 홀수 행에 스타일을 적용합니다.

col

Object

열들의 스타일을 정의합니다.

형태는 row와 같습니다.

defaultStyle

Object

셀의 스타일을 정의합니다.

형태는 style과 같습니다.

tableStyle

Object

표의 스타일을 정의합니다.

형태는 style과 같습니다.


Note
title참고사항
  • 잘못된 템플릿 설정 시, 템플릿이 보이지 않거나, 일부 스타일이 적용되지 않을 수 있습니다.
  • 스타일 우선순위는 다음과 같습니다.
    • headRow > headCol > highlightRow > highlightCol > defaultStyle

editor.table.template.list 설정

...


Code Block
languagejs
var synapEditorConfig = {
    'editor.table.template.styles': {
        'Dark Mode': {
            defaultStyle: {
                color: 'rgb(220, 220, 220)',
                backgroundColor: 'rgb(30, 30, 30)',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'rgb(60, 60, 60)'
                    }
                }
            }
        },
        'Rainbow': {
            row: {
                head: {
                    index: 0,
                    style: {
                        backgroundColor: 'red',
                        borders: {
                            top: {
                                type: 'solid',
                                width: 1,
                                color: 'black'
                            }
                        }
                    }
                },
                highlight: {
                    indexisEven: 1true,
                    style: {
                        backgroundColor: 'yellow',
                        borders: {
                            top: {
                                type: 'solid',
                                width: 1,
                                color: 'black'
                            }
                        }
                    }
                }
            },
            defaultStyle: {
                color: 'white',
                backgroundColor: 'blue',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'black'
                    }
                }
            }
        }
    },
    'editor.table.template.list': {
        popup: [
            ['Basic', 'Gray Column Header', 'Gray Row Header', 'Dual Header'],
            ['Sideless Zebra', 'Sideless GrayScale', 'GrayScale', 'Striped Black Row Header'],
            ['Dark Mode', 'Rainbow']
        ],
        dialog: [
            ['Basic', 'Dashed', 'GrayScale', 'Zebra'],
            ['Sideless', 'Sideless Zebra', 'Sideless GrayScale', 'Sideless Black'],
            ['Gray Column Header', 'Dashed Gray Column Header', 'Dual Header', 'Dashed Dual Header'],
            ['Gray Row Header', 'Dashed Gray Row Header', 'Sideless Black Row Header', 'Striped Black Row Header'],
            ['Dark Mode', 'Rainbow']
        ]
    }
}


표 생성 팝업표 속성 다이얼로그 - [스타일 & 제목 셀] 탭


...