You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ej2-javascript/rich-text-editor/import-and-export.md
+112-5Lines changed: 112 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
layout: post
3
-
title: Content Import/Export in ##Platform_Name## Rich Text Editor control | Syncfusion
3
+
title: Import/Export in ##Platform_Name## Rich Text Editor | Syncfusion
4
4
description: Learn here all about Content Import/Export in Syncfusion ##Platform_Name## Rich Text Editor control of Syncfusion Essential JS 2 and more.
5
5
platform: ej2-javascript
6
6
control: IContent Import/Export
@@ -15,7 +15,7 @@ domainurl: ##DomainURL##
15
15
16
16
The Rich Text Editor provides functionality to import content directly from Microsoft Word documents, preserving the original formatting and structure. This feature ensures a smooth transition of content from Word to the editor, maintaining elements such as headings, lists, tables, and text styles.
17
17
18
-
To integrate an `ImportWord` option into the Rich Text Editor toolbar, you can add it as a custom toolbar [items](../api/rich-text-editor/toolbarSettings/#items) using the items property in toolbarSettings.
18
+
To integrate an `ImportWord` option into the Rich Text Editor toolbar, you can add it as a custom toolbar [items](https://ej2.syncfusion.com/documentation/api/rich-text-editor/toolbarSettings#items) using the items property in toolbarSettings.
19
19
20
20
The following example illustrates how to set up the `ImportWord` in the Rich Text Editor to facilitate content importation from Word documents:
21
21
@@ -46,7 +46,46 @@ The following example illustrates how to set up the `ImportWord` in the Rich Tex
Here’s how to handle the server-side action for importing content from Word.
49
+
## Secure importing with authentication
50
+
51
+
The Rich Text Editor provides functionality to import Word documents with authentication for secure importing.
52
+
53
+
The [wordImporting](https://ej2.syncfusion.com/documentation/api/rich-text-editor/index-default#wordimporting) event provides [UploadingEventArgs](https://ej2.syncfusion.com/documentation/api/uploader/uploadingeventargs) for secure Word file import. Use `currentRequest` to add authentication headers and `customFormData` to include extra parameters in the POST body along with the uploaded file. On the server, read headers and form data from the request to validate and process the import securely.
54
+
55
+
The following example demonstrates how to configure `wordImporting` for secure importing:
// Read custom form data (from args.customFormData)
105
+
varformData=Request.Form("userId").ToString();
63
106
stringHtmlString=string.Empty;
64
107
if (UploadFiles!=null)
65
108
{
@@ -116,7 +159,7 @@ public class RichTextEditorController : Controller
116
159
117
160
The Rich Text Editor's export functionality allows users to convert their edited content into PDF or Word documents with a single click, preserving all text styles, images, tables, and other formatting elements.
118
161
119
-
You can add `ExportWord` and `ExportPdf` tools to the Rich Text Editor toolbar using the toolbarSettings [items](../api/rich-text-editor/toolbarSettings/#items) property.
162
+
You can add `ExportWord` and `ExportPdf` tools to the Rich Text Editor toolbar using the toolbarSettings [items](https://ej2.syncfusion.com/documentation/api/rich-text-editor/toolbarSettings#items) property.
120
163
121
164
The following example demonstrates how to configure the `ExportWord` and `ExportPdf` tools in the Rich Text Editor, facilitating the export of content into Word or PDF documents:
122
165
@@ -147,7 +190,65 @@ The following example demonstrates how to configure the `ExportWord` and `Export
Here’s how to handle the server-side action for exporting content to PDF and Microsoft Word
193
+
## Secure exporting with authentication
194
+
195
+
The Rich Text Editor provides functionality to export Word or PDF documents with authentication for secure exporting.
196
+
197
+
The [documentExporting](https://ej2.syncfusion.com/documentation/api/rich-text-editor/index-default#documentexporting) event provides `ExportingEventArgs` for secure export of Word or PDF files. Use `exportType` to identify the format, `currentRequest` to add authentication headers, and `customFormData` to send extra parameters in the POST body. On the server, read headers and custom data to validate and process the export securely.
198
+
199
+
The following example demonstrates how to configure `documentExporting` for secure exporting:
0 commit comments