BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
|
DocumentEditorContainer Component |
DocumentEditor Component |
Description |
Includes all the modules and comes with predefined toolbar, property pane & status bar. |
A plain editor which requires needed functionality to be injected on the required modules you are about to view/edit using DocumentEditor |
Modules |
All modules are enabled by default. So we cannot reduce the dependent files size further. |
All the needed dependencies are installed but only injected modules script will be loaded in the browser make it light weight. |
enableSelection to false |
Editor module is dependent on selection module. If you disable selection and enable editor, then selection will be injected by default in editor module. |
enableToolbar={true} |
Inbuilt toolbar has showcased with all supporting feature options. If you disable any of the modules, then options in toolbar which are depended on disabled modules will not work.
Note: We cannot remove or add any options in toolbar. currently document editor container doesn’t provide support to customize toolbar. |
enableWordExport={true} |
Word export is dependent on SFDT export module. Hence injecting this alone will not work. |
import { DocumentEditorComponent, Print, Selection, Editor, WordExport, SfdtExport } from '@syncfusion/ej2-react-documenteditor';
import { DocumentLoader } from './document-loader';
import { TitleBar } from './title-bar';
import { StatusBar } from './status-bar';
DocumentEditorComponent.Inject(Print, Editor, WordExport, SfdtExport);
<DocumentEditorComponent id="container" ref={(scope) => { this.documenteditor = scope; }} enablePrint={true} enableEditor={true} isReadOnly={false} enableWordExport={true} enableSfdtExport={true} style={{ width: '100%', height: '100%' }}/>
|
wordDocument.Save(stream, FormatType.Rtf); |
wordDocument .Save(stream , FormatType .Html ); |
Hi Harini. Thanks for the response.
While converting the sfdt to HTML using following line of code, an error is triggering. (Using the latest nuget packages)
wordDocument
.Save(stream
, FormatType
.Html
);
System.Web.HttpPostedFile data = HttpContext.Current.Request.Files[0];
//Opens document stream
WordDocument wordDocument = new WordDocument(data.InputStream);
MemoryStream stream = new MemoryStream();
//Converts document stream as HTML
wordDocument.Save(stream, FormatType.Html);
wordDocument.Close();
stream.Position = 0;
StreamReader reader = new StreamReader(stream);
//wordDocument.Close();
string text = reader.ReadToEnd();
// Now, you set this html string to email body
return text; |