Heyy @shaked46763744
,to highlight the code you can type the language name after the three backticks you use to include the code block.
Something like this..
```javascript
let badName = "This is highlighted text"
```
Hence the results will be:
letbadName="This is highlighted text"
See how your code looks like:
<template><div><div@click="exportDocx">
Generate .docx file
</div></div></template><script>import{Document,Packer,Paragraph,TextRun}from"docx";// import { saveAs } from 'file-saver'; // you can use this alsoconstFileSaver=require("file-saver");exportdefault{methods:{exportDocx(){// Create a new Document an save it in a variableconstdoc=newDocument({sections:[{properties:{},children:[newParagraph({children:[newTextRun("Hello World"),newTextRun({text:"Foo Bar",bold:true,}),newTextRun({text:"אני אדם כמו כל אדם אחר בעולם חחחחחחחחחח הצחקתי את עצמי ",bold:true,}),],}),],},],});constmimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document";constfileName="test.docx";Packer.toBlob(doc).then((blob)=>{constdocblob=blob.slice(0,blob.size,mimeType);FileSaver.saveAs(docblob,fileName);});},},};</script><stylelang="scss"scoped></style>
Heyy @shaked46763744 ,to highlight the code you can type the language name after the three backticks you use to include the code block.
Something like this..
Hence the results will be:
See how your code looks like:
OK THX