File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/pluggableWidgets/rich-text-web/src/utils/formats/quill-table-better Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -170,10 +170,11 @@ class Table extends Module {
170170 }
171171
172172 insertTable ( rows : number , columns : number ) {
173+ const baseStyle = "border: 1px solid #000;" ;
173174 const range = this . quill . getSelection ( true ) ;
174175 if ( range == null ) return ;
175176 if ( this . isTable ( range ) ) return ;
176- const style = `width: ${ CELL_DEFAULT_WIDTH * columns } px` ;
177+ const style = `width: ${ CELL_DEFAULT_WIDTH * columns } px; ${ baseStyle } ` ;
177178 const formats = this . quill . getFormat ( range . index - 1 ) ;
178179 const [ , offset ] = this . quill . getLine ( range . index ) ;
179180 const isExtra = ! ! formats [ TableCellBlock . blotName ] || offset !== 0 ;
@@ -189,7 +190,7 @@ class Table extends Module {
189190 return new Array ( columns ) . fill ( "\n" ) . reduce ( ( memo , text ) => {
190191 return memo . insert ( text , {
191192 [ TableCellBlock . blotName ] : cellId ( ) ,
192- [ TableCell . blotName ] : { "data-row" : id , width : `${ CELL_DEFAULT_WIDTH } ` }
193+ [ TableCell . blotName ] : { "data-row" : id , width : `${ CELL_DEFAULT_WIDTH } ` , style : baseStyle }
193194 } ) ;
194195 } , memo ) ;
195196 } , base ) ;
You can’t perform that action at this time.
0 commit comments