
1,066 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I am trying to create a word add-in, there's a textarea on its pane, I need to insert the content in this textarea to word.
my code
const content = document.getElementById("tacontent").value;
context.document.body.insertParagraph(content, Word.InsertLocation.end);
await context.sync();
But when I am trying to insert some words with line break like following
123
456
098
They will be displayed like following on word
123\n456\n098
The break lines were turned into a string \n
.
How can I fix this, thank you.