@@ -11,7 +11,6 @@ import type {
11
11
DOMConversionOutput ,
12
12
DOMExportOutput ,
13
13
EditorConfig ,
14
- ElementFormatType ,
15
14
LexicalEditor ,
16
15
LexicalNode ,
17
16
NodeKey ,
@@ -27,7 +26,6 @@ import {
27
26
$isLineBreakNode ,
28
27
$isTextNode ,
29
28
ElementNode ,
30
- ParagraphNode ,
31
29
} from 'lexical' ;
32
30
33
31
import { COLUMN_WIDTH , PIXEL_VALUE_REG_EXP } from './constants' ;
@@ -147,13 +145,9 @@ export class TableCellNode extends ElementNode {
147
145
}
148
146
if ( this . __writingMode ) {
149
147
element . style . writingMode = this . __writingMode ;
150
- element . style . verticalAlign = computeVerticalFormat (
151
- this . getChildFormatType ( ) ,
152
- ) ;
153
- element . style . transform = 'rotate(180deg)' ;
148
+ element . style . verticalAlign = computeVerticalFormat ( this . getFormatType ( ) ) ;
154
149
} else {
155
150
element . style . verticalAlign = '' ;
156
- element . style . transform = '' ;
157
151
}
158
152
159
153
addClassNamesToElement (
@@ -255,14 +249,6 @@ export class TableCellNode extends ElementNode {
255
249
return this . getLatest ( ) . __width ;
256
250
}
257
251
258
- getChildFormatType ( ) : ElementFormatType {
259
- return this . getFirstChild < ParagraphNode > ( ) ! . getFormatType ( ) ;
260
- }
261
-
262
- getChildTextDirection ( ) : 'ltr' | 'rtl' | null {
263
- return this . getFirstChild < ParagraphNode > ( ) ! . getDirection ( ) ;
264
- }
265
-
266
252
getCellDirection ( ) : 'horizontal' | 'vertical' {
267
253
if ( this . getLatest ( ) . __writingMode ) {
268
254
return 'vertical' ;
@@ -273,12 +259,7 @@ export class TableCellNode extends ElementNode {
273
259
274
260
setCellDirection ( direction : 'horizontal' | 'vertical' ) : void {
275
261
if ( direction === 'vertical' ) {
276
- const childTextDirection = this . getChildTextDirection ( ) ;
277
- if ( childTextDirection === 'rtl' ) {
278
- this . getWritable ( ) . __writingMode = 'vertical-rl' ;
279
- } else {
280
- this . getWritable ( ) . __writingMode = 'vertical-lr' ;
281
- }
262
+ this . getWritable ( ) . __writingMode = 'vertical-lr' ;
282
263
} else {
283
264
this . getWritable ( ) . __writingMode = undefined ;
284
265
}
0 commit comments