Spaces:
Paused
Paused
nkw
commited on
Update index.js
Browse files
index.js
CHANGED
|
@@ -42,9 +42,19 @@ async function MdtoPdf(md, type) {
|
|
| 42 |
body {
|
| 43 |
font-family: 'OpenSans', sans-serif;
|
| 44 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
</style>
|
| 46 |
</head>
|
| 47 |
-
<body
|
|
|
|
|
|
|
| 48 |
</html>
|
| 49 |
`;
|
| 50 |
await page.setContent(fullHtmlContent, { waitUntil: "domcontentloaded" });
|
|
|
|
| 42 |
body {
|
| 43 |
font-family: 'OpenSans', sans-serif;
|
| 44 |
}
|
| 45 |
+
.rtl {
|
| 46 |
+
direction: rtl; /* Right-to-left for Arabic text */
|
| 47 |
+
text-align: right; /* Align Arabic text to the right */
|
| 48 |
+
}
|
| 49 |
+
.ltr {
|
| 50 |
+
direction: ltr; /* Left-to-right for normal text */
|
| 51 |
+
text-align: left; /* Align normal text to the left */
|
| 52 |
+
}
|
| 53 |
</style>
|
| 54 |
</head>
|
| 55 |
+
<body>
|
| 56 |
+
${htmlContent}
|
| 57 |
+
</body>
|
| 58 |
</html>
|
| 59 |
`;
|
| 60 |
await page.setContent(fullHtmlContent, { waitUntil: "domcontentloaded" });
|