I'm planning to develop an web application wherein there's an WYSIWYG text editor which you can save to database and export the output into DOCX/MS WORD. I could only find word automation/export on c#, but I need the text editor to be real time so that number of clients can edit at the same time.
I'm thinking of using asp.net core with angular typescript and ms sql to build this app. And unfortunately I'm struggling on how I can generate the Word Document on c# when the page is rendered in Angular Typescript.
using Word = Microsoft.Office.Interop.Word;
using System.Reflection;
private void Generate()
{
object oMissing = System.Reflection.Missing.Value;
object oEndOfDoc = "\\endofdoc"; /* \endofdoc is a predefined bookmark */
//Start Word and create a new document.
Word._Application oWord;
Word._Document oDoc;
oWord = new Word.Application();
oWord.Visible = true;
oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,
ref oMissing, ref oMissing);}
//so on and so forth
home.component.html
<button type="button" class="btn btn-primary btn-md" (click)="Generate()">
Show Message
</button>
I'm new to angular, but if there's a better a approach rather than asp.net core and angular typescript or different language / library I could use feel free to comment.
Also if I can get this working I would be much easier for me.