#751 Add bidi visual - Visual Right to Left

This commit is contained in:
Dolan Miu
2021-03-04 02:02:28 +00:00
parent a026e5bd1f
commit 2aa93e6105
8 changed files with 92 additions and 5 deletions

View File

@ -1,7 +1,7 @@
// This demo shows right to left for special languages
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, TextRun } from "../build";
import { Document, Packer, Paragraph, Table, TableCell, TableRow, TextRun } from "../build";
const doc = new Document();
@ -36,6 +36,31 @@ doc.addSection({
}),
],
}),
new Table({
visuallyRightToLeft: true,
rows: [
new TableRow({
children: [
new TableCell({
children: [new Paragraph("שלום עולם")],
}),
new TableCell({
children: [],
}),
],
}),
new TableRow({
children: [
new TableCell({
children: [],
}),
new TableCell({
children: [new Paragraph("שלום עולם")],
}),
],
}),
],
}),
],
});