Some functionality is missing from the toolbar

Hello,

So, I noticed some functionality aren't working as expected in the WordEditor Vue.js component which are the following:

1. Page Number:
It doesn't insert page number for each page at the lower right for example as word does. It just inserts the current page number in the current cursor position which I find counterintuitive.


2. Footnotes and Endnotes:
When I insert a footnote or endnote, things work perfect on the frontend, but when I save the document and open it again, all notes are just gone.



3. Comments:
Comments also work perfectly on the frontend, but when saving and opening the document again, all comments are just gone.
This means, I'm not able to persist comments changes in the document.



4. Update Fields:
This also doesn't work, no matter I have form field or not in the document at hand.

Kindly notice that to save a document, I'm using same code as in the demos:
"WordDocument.Save(param.Sfdt, GetFormatType(type.ToLower()));"


Thanks a lot for your support,


1 Reply 1 reply marked as answer

KB Kurthis Banu Abdul Majeeth Syncfusion Team February 12, 2021 03:50 PM UTC

Hi Omar, 

Regarding: Page Number  

We have considered the behaviour for insert page number in current position alone. To insert page number, 
goToheader/Footer, insert page number  
Also, you can insert page number in current position. 

Code-Snippet  
this.$refs.documenteditor.ej2Instances.selection.goToHeader();  
                           (OR) 
 this.$refs.documenteditor.ej2Instances.selection.goToFooter(); 
 
this.$refs.documenteditor.ej2Instances. editor.insertPageNumber(); 
 



Regarding: Update Fields 

Please refer the below video link to know how to update the fields: 

Currently, Document Editor doesn’t have support to insert cross reference field UI level support we have preservation support only. Document Editor having support to update fields. 


Regarding:  Footnotes and Endnotes and Comments: 

we have client-side comment export support and using saveAsBlob API you can save document in server side.  

Code Snippet for export document into blob in client-side: 

exportBlob: function () { 
 
            this.$refs.documenteditor.saveAsBlob('Docx').then((exportedDocument: Blob) => { 
 
             var fileReader = new FileReader(); 
                fileReader.onload = function () { 
                    var base64Text = “; base64,"; 
                    var param = { 
                        fileName: documenteditor.documentName, 
                        documentData: fileReader.result. substring (fileReader.result.indexOf(base64Text) + base64Text.length) 
                   
                    var httpRequest = new XMLHttpRequest(); 
                    httpRequest.open('Post', baseUrl, true); 
                    httpRequest.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); 
                    httpRequest.onreadystatechange = function () { 
                        if (httpRequest.readyState === 4) { 
                            if (httpRequest.status === 200 || httpRequest.status === 304) { 
                                //Sucess 
                           
                       
                    }; 
                    httpRequest.send(JSON.stringify({param: { fileName: documenteditor.documentName, documentData: fileReader.result.substring(fileReader.result.indexOf(base64Text) + base64Text.length) } })); 
                }; 
 
                fileReader.readAsDataURL(blob); 
 
 
 
            }); 
       
 


Please, refer to the following sample to export document into blob in client-side. 



Document editor doesn't have support for comment and Footnotes and Endnotes save support in server-side. We have logged the feature request for this. And it can be tracked through our feedback portal below.    


Regards, 

Kurthis Banu A. 


Marked as answer
Loader.
Up arrow icon