Open File Validation

Hi there,

I'm using the Document Editor Component which has a built-in toolbar. Is it possible to have a validation check when opening a doc file, like size and char count? Thanks.

Best,
Le

1 Reply 1 reply marked as answer

AE Ajithamarlin Edward Syncfusion Team November 2, 2020 12:43 PM UTC

Hi Le, 

Reg. Is it possible to have a validation check when opening a doc file, like size and char count? 
 
You can validate the file size using beforeFileOpen event. 
 
Sample code: 
 
container.documentEditor.beforeFileOpen = (args: BeforeFileOpenArgs): void => { 
let filesize: number = args.fileSize; 
} 
 
 
Please refer the below link. 
 
 
Reg. Char count: 
 
Currently Document editor doesn’t provide support to validate the char count. 

Regards, 
Ajithamarlin E 


Marked as answer
Loader.
Up arrow icon