diff --git a/lib/docx/docxtable.js b/lib/docx/docxtable.js index 44ac0861..b884cf80 100644 --- a/lib/docx/docxtable.js +++ b/lib/docx/docxtable.js @@ -326,6 +326,9 @@ module.exports = { if (opts.vMerge) { cellObj['w:tc']['w:tcPr']['w:vMerge'] = { '@w:val': opts.vMerge } } + if (opts.textDirection) { + cellObj['w:tc']['w:tcPr']['w:textDirection'] = { '@w:val': opts.textDirection } + } return cellObj } diff --git a/manual/docx/README.md b/manual/docx/README.md index fe9a75f6..037c436e 100644 --- a/manual/docx/README.md +++ b/manual/docx/README.md @@ -240,7 +240,8 @@ var table = [ fill: "92CDDC", themeFill: "text1", "themeFillTint": "80" - } + }, + textDirection: 'btLr' // to rotate text, or 'tbRl' to another direction } }], [1,'All grown-ups were once children',''],