Page tree

Versions Compared

Key

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

사이냅 에디터에서 제공하는 표 템플릿 스타일 기능을 이용하면 더 빠르고 편리한 표 편집이 가능합니다.


설정

Keykey설명
editor.table.template.styles표 템플릿 스타일을 설정합니다.
editor.table.template.list보여줄 템플릿을 설정합니다.

...

editor.table.template.styles

keytype설명
row

Object

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


head

Object

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


index

Number

인자로 받은 인덱스(행 or 열)에 스타일을 적용할지 여부를 판단합니다.

style

Object

css로 표현할 수 있는 스타일을 정의합니다.

기존의 스타일 이외에도 추가할 수 있습니다.


color

String

텍스트 색상

backgroundColor

String

배경 색상

borders

Object

borders를 정의합니다


top

Object

border-top 정의


style

String

테두리 스타일

width

Number

테두리 두께

color

String

테두리 색상

bottomObject

형태는 top과 같습니다.

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

leftObject

형태는 top과 같습니다.

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

rightObject

형태는 top과 같습니다.

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

highlight

Object

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

형태는 head와 같습니다.

col

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

형태는 row와 같습니다.

defaultStyle

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

형태는 style과 같습니다.

tableStyle

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

형태는 style과 같습니다.

...

적용예시

Expand
title기본 표 템플릿 스타일



StyleKeyConfig
1

Image Modified

Basic


Code Block
languagejs
'Basic': {
    defaultStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black',
            }
        }
    }
}


2

Image Modified

Dashed


Code Block
languagejs
'Dashed': {
    defaultStyle: {
        borders: {
            top: {
                type: 'dashed',
                width: 1,
                color: 'black'
            }
        }
    },
    tableStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            }
        }
    }
}


3

Image Modified

GrayScale


Code Block
languagejs
'GrayScale': {
    row: {
        highlight: {
            index: 1,
            style: {
                backgroundColor: 'darkgray',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'white'
                    }
                }
            }
        }
    },
    defaultStyle: {
        backgroundColor: 'lightgray',
            borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'white'
            }
        }
    }
}


4

Image Modified

Zebra


Code Block
languagejs
'Zebra': {
    row: {
        highlight: {
            index: 1,
            style: {
                backgroundColor: 'darkgray',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'black'
                    }
                }
            }
        }
    },
    defaultStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            }
        }
    }
}


5

Image Modified

Sideless


Code Block
languagejs
'Sideless': {
    defaultStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            },
            left: {
                type: 'none',
                width: 0,
                color: 'white'
            }
        }
    },
    tableStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            }
        }
    }
}


6

Image Modified

Sideless Zebra


Code Block
languagejs
'Sideless Zebra': {
    row: {
        highlight: {
            index: 0,
            style: {
                backgroundColor: 'lightgray',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'black'
                    },
                    left: {
                        type: 'none',
                        width: 0,
                        color: 'white'
                    }
                }
            }
        }
    },
    defaultStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            },
            left: {
                type: 'none',
                width: 0,
                color: 'white'
            }
        }
    },
    tableStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            }
        }
    }
}


7

Image Modified

Sideless GrayScale


Code Block
languagejs
'Sideless GrayScale': {
    row: {
        highlight: {
            index: 0,
            style: {
                backgroundColor: 'darkgray',
                borders: {
                    top: {
                        type: 'none',
                        width: 0,
                        color: 'white'
                    }
                }
            }
        }
    },
    defaultStyle: {
        backgroundColor: 'lightgray',
        borders: {
            top: {
                type: 'none',
                width: 0,
                color: 'white'
            }
        }
    }
}


8

Image Modified

Sideless Black


Code Block
languagejs
'Sideless Black': {
    defaultStyle: {
        color: 'white',
        backgroundColor: 'black',
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'white'
            },
            left: {
                type: 'none',
                width: 0,
                color: 'white'
            }
        }
    }
}


9

Image Modified

Gray Column Header


Code Block
languagejs
'Gray Column Header': {
    col: {
        head: {
            index: 0,
            style: {
                backgroundColor: 'darkgray',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'black'
                    }
                }
            }
        }
    },
    defaultStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            }
        }
    }
}


10

Image Modified

Dashed Gray Column Header


Code Block
languagejs
'Gray Column Header': {
    col: {
        head: {
            index: 0,
            style: {
                backgroundColor: 'darkgray',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'black'
                    }
                }
            }
        }
    },
    defaultStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            }
        }
    }
}


11

Image Modified

Dual Header


Code Block
languagejs
'Dual Header': {
    row: {
        head: {
            index: 0,
            style: {
                backgroundColor: 'darkgray',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'black'
                    }
                }
            }
        }
    },
    col: {
        head: {
            index: 0,
            style: {
                backgroundColor: 'lightgray',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'black'
                    }
                }
            }
        }
    },
    defaultStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            }
        }
    }
}


12

Image Modified

Dashed Dual Header


Code Block
languagejs
'Dashed Dual Header': {
    row: {
        head: {
            index: 0,
            style: {
                backgroundColor: 'darkgray',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'black'
                    }
                }
            }
        }
    },
    col: {
        head: {
            index: 0,
            style: {
                backgroundColor: 'lightgray',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'black'
                    }
                }
            }
        }
    },
    defaultStyle: {
        borders: {
            top: {
                type: 'dashed',
                width: 1,
                color: 'black'
            }
        }
    },
    tableStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            }
        }
    }
}


13

Image Modified

Gray Row Header


Code Block
languagejs
'Gray Row Header': {
    row: {
        head: {
            index: 0,
            style: {
                backgroundColor: 'darkgray',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'black'
                    }
                }
            }
        }
    },
    defaultStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            }
        }
    }
}


14

Image Modified

Dashed Gray Row Header


Code Block
languagejs
'Dashed Gray Row Header': {
    row: {
        head: {
            index: 0,
            style: {
                backgroundColor: 'darkgray',
                borders: {
                    top: {
                    type: 'solid',
                        width: 1,
                        color: 'black'
                    }
                }
            }
        }
    },
    defaultStyle: {
        borders: {
            top: {
                type: 'dashed',
                width: 1,
                color: 'black'
            }
        }
    },
    tableStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            }
        }
    }
}


15

Image Modified

Sideless Black Row


Code Block
languagejs
'Sideless Black Row Header': {
    row: {
        head: {
            index: 0,
            style: {
                color: 'white',
                backgroundColor: 'black',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'black'
                    },
                    left: {
                        type: 'none',
                        width: 0,
                        color: 'white'
                    }
                }
            }
        }
    },
    defaultStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            },
            left: {
                type: 'none',
                width: 0,
                color: 'white'
            }
        }
    },
    tableStyle: {
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'black'
            }
        }
    }
}


16

Image Modified

Striped Black Row Header


Code Block
languagejs
'Striped Black Row Header': {
    row: {
        head: {
            index: 0,
            style: {
                color: 'white',
                backgroundColor: 'black',
                borders: {
                    top: {
                        type: 'solid',
                        width: 1,
                        color: 'white'
                    }
                }
            }
        },
        highlight: {
            index: 1,
            style: {
                backgroundColor: 'darkgray',
                    borders: {
                        top: {
                        type: 'solid',
                        width: 1,
                        color: 'white'
                    }
                }
            }
        }
    },
    defaultStyle: {
        backgroundColor: 'lightgray',
        borders: {
            top: {
                type: 'solid',
                width: 1,
                color: 'white'
            }
        }
    }
}