bidi+rtl demo
This commit is contained in:
14
demo/demo22.js
Normal file
14
demo/demo22.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
const docx = require('../build');
|
||||||
|
|
||||||
|
var doc = new docx.Document();
|
||||||
|
|
||||||
|
var textRun = new docx.TextRun("שלום עולם").rtl();
|
||||||
|
var paragraph = new docx.Paragraph().bidi();
|
||||||
|
paragraph.addRun(textRun);
|
||||||
|
|
||||||
|
doc.addParagraph(paragraph);
|
||||||
|
|
||||||
|
var exporter = new docx.LocalPacker(doc);
|
||||||
|
exporter.pack('My Document');
|
||||||
|
|
||||||
|
console.log('Document created successfully at project root!');
|
Reference in New Issue
Block a user