adds textDirection to table cells
This commit is contained in:
@ -5,7 +5,7 @@ import { BorderStyle } from "file/styles";
|
||||
|
||||
import { ShadingType } from "../shading";
|
||||
import { TableCell } from "./table-cell";
|
||||
import { TableCellBorders, TableCellWidth, VerticalAlign, VerticalMergeType, WidthType } from "./table-cell-components";
|
||||
import { TableCellBorders, TableCellWidth, TextDirection, VerticalAlign, VerticalMergeType, WidthType } from "./table-cell-components";
|
||||
|
||||
describe("TableCellBorders", () => {
|
||||
describe("#prepForXml", () => {
|
||||
@ -271,6 +271,34 @@ describe("TableCell", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("should create with text direction", () => {
|
||||
const cell = new TableCell({
|
||||
children: [],
|
||||
textDirection: TextDirection.BOTTOMTOTOPLEFTTORIGHT,
|
||||
});
|
||||
|
||||
const tree = new Formatter().format(cell);
|
||||
|
||||
expect(tree).to.deep.equal({
|
||||
"w:tc": [
|
||||
{
|
||||
"w:tcPr": [
|
||||
{
|
||||
"w:textDirection": {
|
||||
_attr: {
|
||||
"w:val": "btLr",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"w:p": {},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
it("should create with vertical merge", () => {
|
||||
const cell = new TableCell({
|
||||
children: [],
|
||||
|
Reference in New Issue
Block a user