Skip to content

Commit f17b6c8

Browse files
committed
Conflicts cleared
2 parents 70da18c + c591324 commit f17b6c8

File tree

20 files changed

+280
-12
lines changed

20 files changed

+280
-12
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Essential Studio for ##Platform_Name## Weekly Release Release Notes
3+
description: Essential Studio for ##Platform_Name## Weekly Release Release Notes
4+
platform: ej2-asp-core-mvc
5+
documentation: ug
6+
---
7+
8+
# Essential Studio for ##Platform_Name## Release Notes
9+
10+
{% include release-info.html date="July 09, 2024" version="v26.1.41" %}
11+
12+
{% directory path: _includes/release-notes/v26.1.41 %}
13+
14+
{% include {{file.url}} %}
15+
16+
{% enddirectory %}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public ActionResult Default()
2+
{
3+
return View();
4+
}
5+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<div id="documenteditor" style="width:100%;height:100%">
2+
@Html.EJS().DocumentEditorContainer("container").Created("onDocCreate").EnableToolbar(true).Render()
3+
</div>
4+
5+
<script>
6+
function onDocCreate() {
7+
var container = document.getElementById("container").ej2_instances[0];
8+
var toolItem = {
9+
prefixIcon: "e-save icon",
10+
tooltipText: "Save the Document",
11+
text: "Save",
12+
id: "save"
13+
};
14+
container.toolbarItems = ['New','Open',toolItem, 'Separator' ,'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl'];
15+
container.toolbarClick = function (args) {
16+
switch (args.item.id) {
17+
case 'save':
18+
container.documentEditor.save('sample','Docx');
19+
break;
20+
}
21+
};
22+
}
23+
</script>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<ejs-documenteditorcontainer id="container" created="onDocCreate"></ejs-documenteditorcontainer>
2+
<script>
3+
function onDocCreate() {
4+
var container = document.getElementById("container").ej2_instances[0];
5+
var toolItem = {
6+
prefixIcon: "e-de-ctnr-lock",
7+
tooltipText: "Disable Image",
8+
text: "Disable Image",
9+
id: "Custom"
10+
};
11+
container.toolbarItems = ['New','Open',toolItem, 'Separator' ,'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'Comments', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'Separator', 'Find', 'Separator', 'LocalClipboard', 'RestrictEditing'];
12+
container.toolbarClick = function (args) {
13+
switch (args.item.id) {
14+
case 'Custom':
15+
container.documentEditor.save('Sample', 'Docx');
16+
break;
17+
}
18+
};
19+
}
20+
</script>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
@Html.EJS().DocumentEditorContainer("container").Created("onCreate").EnableToolbar(true).Render()
3+
4+
5+
<script>
6+
var container;
7+
var containerPanel;
8+
var contentChanged =false;
9+
document.addEventListener('DOMContentLoaded', function () {
10+
var documenteditorElement = document.getElementById("container");
11+
container = documenteditorElement.ej2_instances[0];
12+
container.contentChange=function(){
13+
contentChanged = true;
14+
}
15+
});
16+
function onCreate() {
17+
var documenteditorElement = document.getElementById("container");
18+
container = documenteditorElement.ej2_instances[0];
19+
setInterval(() => {
20+
if (contentChanged) {
21+
//You can save the document as below
22+
container.documentEditor.saveAsBlob('Docx').then((blob) => {
23+
console.log('Saved sucessfully');
24+
let exportedDocument = blob;
25+
//Now, save the document where ever you want.
26+
let formData = new FormData();
27+
formData.append('fileName', 'sample.docx');
28+
formData.append('data', exportedDocument);
29+
/* tslint:disable */
30+
var req = new XMLHttpRequest();
31+
// Replace your running Url here
32+
req.open(
33+
'POST',
34+
'http://localhost:62869/api/documenteditor/AutoSave',
35+
true
36+
);
37+
req.onreadystatechange = () => {
38+
if (req.readyState === 4) {
39+
if (req.status === 200 || req.status === 304) {
40+
console.log('Saved sucessfully');
41+
}
42+
}
43+
};
44+
req.send(formData);
45+
});
46+
contentChanged = false;
47+
}
48+
}, 1000);
49+
}
50+
51+
</script>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<ejs-documenteditorcontainer id="container" enableToolbar=true height="590px"></ejs-documenteditorcontainer>
2+
3+
<script>
4+
var container;
5+
var containerPanel;
6+
var contentChanged =false;
7+
document.addEventListener('DOMContentLoaded', function () {
8+
var documenteditorElement = document.getElementById("container");
9+
container = documenteditorElement.ej2_instances[0];
10+
container.contentChange=function(){
11+
contentChanged = true;
12+
}
13+
});
14+
function onCreate() {
15+
var documenteditorElement = document.getElementById("container");
16+
container = documenteditorElement.ej2_instances[0];
17+
setInterval(() => {
18+
if (contentChanged) {
19+
//You can save the document as below
20+
container.documentEditor.saveAsBlob('Docx').then((blob) => {
21+
console.log('Saved sucessfully');
22+
let exportedDocument = blob;
23+
//Now, save the document where ever you want.
24+
let formData = new FormData();
25+
formData.append('fileName', 'sample.docx');
26+
formData.append('data', exportedDocument);
27+
/* tslint:disable */
28+
var req = new XMLHttpRequest();
29+
// Replace your running Url here
30+
req.open(
31+
'POST',
32+
'http://localhost:62869/api/documenteditor/AutoSave',
33+
true
34+
);
35+
req.onreadystatechange = () => {
36+
if (req.readyState === 4) {
37+
if (req.status === 200 || req.status === 304) {
38+
console.log('Saved sucessfully');
39+
}
40+
}
41+
};
42+
req.send(formData);
43+
});
44+
contentChanged = false;
45+
}
46+
}, 1000);
47+
}
48+
49+
</script>

ej2-asp-core-mvc/code-snippet/document-editor/custom-toolbar/razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
text: "Disable Image",
1212
id: "Custom"
1313
};
14-
container.toolbarItems = [toolItem, 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'Comments', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'Separator', 'Find', 'Separator', 'LocalClipboard', 'RestrictEditing'];
14+
container.toolbarItems = [toolItem, 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl'];
1515
container.toolbarClick = function (args) {
1616
switch (args.item.id) {
1717
case 'Custom':

ej2-asp-core-mvc/code-snippet/document-editor/custom-toolbar/tagHelper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
text: "Disable Image",
99
id: "Custom"
1010
};
11-
container.toolbarItems = [toolItem, 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'Comments', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'Separator', 'Find', 'Separator', 'LocalClipboard', 'RestrictEditing'];
11+
container.toolbarItems = [toolItem, 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl'];
1212
container.toolbarClick = function (args) {
1313
switch (args.item.id) {
1414
case 'Custom':

ej2-asp-core-mvc/document-editor/EJ2_ASP.MVC/getting-started.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,4 @@ N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-MVC-Get
106106
* [How to load the document by default](../document-editor/how-to/open-default-document).
107107
* [How to customize tool bar](../document-editor/how-to/customize-tool-bar).
108108
* [How to resize Document editor component](../document-editor/how-to/resize-document-editor).
109+
* [How to add a save button to the DocumentEditorContainer component toolbar](../document-editor/how-to/add-save-button-in-toolbar)

ej2-asp-core-mvc/document-editor/EJ2_ASP.NETCORE/getting-started-core.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,4 @@ N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-Core-Ge
117117
* [How to load the document by default](../document-editor/how-to/open-default-document).
118118
* [How to customize tool bar](../document-editor/how-to/customize-tool-bar).
119119
* [How to resize Document editor component](../document-editor/how-to/resize-document-editor).
120+
* [How to add a save button to the DocumentEditorContainer component toolbar](../document-editor/how-to/add-save-button-in-toolbar).
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
layout: post
3+
title: Add save button in ##Platform_Name## Document Editor Component | Syncfusion
4+
description: Learn here to add save button in Syncfusion ##Platform_Name## Document Editor component of Syncfusion Essential JS 2 and more.
5+
platform: ej2-asp-core-mvc
6+
control: Add save button tool bar
7+
publishingplatform: ##Platform_Name##
8+
documentation: ug
9+
---
10+
11+
12+
# Add save button in ##Platform_Name## Document editor toolbar
13+
14+
## To add a save button to the existing toolbar in DocumentEditorContainer
15+
16+
DocumentEditorContainer allows you to add a new button to the existing items in a toolbar using [`CustomToolbarItemModel`] and with existing items in [`toolbarItems`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.DocumentEditor.DocumentEditorContainer.html#Syncfusion_EJ2_DocumentEditor_DocumentEditorContainer_ToolbarItems) property. Newly added item click action can be defined in [`toolbarclick`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.DocumentEditor.DocumentEditorContainer.html#Syncfusion_EJ2_DocumentEditor_DocumentEditorContainer_ToolbarClick).
17+
18+
{% if page.publishingplatform == "aspnet-core" %}
19+
20+
{% tabs %}
21+
{% highlight cshtml tabtitle="CSHTML" %}
22+
{% include code-snippet/document-editor/add-save-button-in-toolbar/tagHelper %}
23+
{% endhighlight %}
24+
{% highlight c# tabtitle="Add-save-button-in-toolbar.cs" %}
25+
{% endhighlight %}{% endtabs %}
26+
27+
{% elsif page.publishingplatform == "aspnet-mvc" %}
28+
29+
{% tabs %}
30+
{% highlight razor tabtitle="CSHTML" %}
31+
{% include code-snippet/document-editor/add-save-button-in-toolbar/razor %}
32+
{% endhighlight %}
33+
{% highlight c# tabtitle="Add-save-button-in-toolbar.cs" %}
34+
{% endhighlight %}{% endtabs %}
35+
{% endif %}
36+
37+
38+
39+
N> Default value of `ToolbarItems` is `['New', 'Open', 'Separator', 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl']`.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
layout: post
3+
title: Auto Save Document in ##Platform_Name## Document Editor Component | Syncfusion
4+
description: Learn here all about Auto save document in document editor in Syncfusion ##Platform_Name## Document Editor component of syncfusion and more.
5+
platform: ej2-asp-core-mvc
6+
control: Auto Save Document In Document Editor
7+
publishingplatform: ##Platform_Name##
8+
documentation: ug
9+
---
10+
11+
12+
# Auto save document in ##Platform_Name## Document editor control
13+
14+
In this article, we are going to see how to autosave the document to server. You can automatically save the edited content in regular intervals of time. It helps reduce the risk of data loss by saving an open document automatically at customized intervals.
15+
16+
The following example illustrates how to auto save the document in server.
17+
18+
* In the client-side, using content change event, we can automatically save the edited content in regular intervals of time. Based on `contentChanged` boolean, the document send as Docx format to server-side using [`saveAsBlob`] method.
19+
20+
{% if page.publishingplatform == "aspnet-core" %}
21+
22+
{% tabs %}
23+
{% highlight cshtml tabtitle="CSHTML" %}
24+
{% include code-snippet/document-editor/auto-save-server/tagHelper %}
25+
{% endhighlight %}
26+
{% highlight c# tabtitle="Auto-save-server.cs" %}
27+
{% endhighlight %}{% endtabs %}
28+
29+
{% elsif page.publishingplatform == "aspnet-mvc" %}
30+
31+
{% tabs %}
32+
{% highlight razor tabtitle="CSHTML" %}
33+
{% include code-snippet/document-editor/auto-save-server/razor %}
34+
{% endhighlight %}
35+
{% highlight c# tabtitle="Auto-save-server.cs" %}
36+
{% endhighlight %}{% endtabs %}
37+
{% endif %}
38+
39+
40+
41+
* In server-side, Receives the stream content from client-side and process it to save the document in Server or Database from the received stream. Add Web API in controller file like below to save the document.
42+
43+
```c#
44+
[AcceptVerbs("Post")]
45+
[HttpPost]
46+
[EnableCors("AllowAllOrigins")]
47+
[Route("AutoSave")]
48+
public string AutoSave()
49+
{
50+
IFormFile file = HttpContext.Request.Form.Files[0];
51+
Stream stream = new MemoryStream();
52+
file.CopyTo(stream);
53+
//Save the stream to database or server as per the requirement.
54+
stream.Close();
55+
return "Sucess";
56+
}
57+
```
58+
59+
## See Also
60+
* [Autosave document in DocumentEditor](../../document-editor/how-to/auto-save-document-in-document-editor)

ej2-asp-core-mvc/document-editor/how-to/customize-tool-bar.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: post
3-
title: Customize Tool Bar in ##Platform_Name## Document Editor Component
3+
title: Customize Tool Bar in ##Platform_Name## Document Editor Component | Syncfusion
44
description: Learn here all about how to customize Tool Bar in Syncfusion ##Platform_Name## Document Editor component of Syncfusion Essential JS 2 and more.
55
platform: ej2-asp-core-mvc
66
control: Customize Tool Bar
@@ -40,4 +40,4 @@ DocumentEditorContainer allows to customize (add, show, hide, enable, and disabl
4040

4141

4242

43-
N> Default value of `ToolbarItems` is `['New', 'Open', 'Separator', 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'Comments', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'Separator', 'Find', 'Separator', 'LocalClipboard', 'RestrictEditing']`.
43+
N> Default value of `ToolbarItems` is `['New', 'Open', 'Separator', 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl']`.

ej2-asp-core-mvc/gantt/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation: ug
99
---
1010

1111

12-
# Overview
12+
# Overview in ##Platform_Name## Gantt component
1313

1414
The Gantt chart is a project management tool which provides a Microsoft Project-like interface for scheduling and managing projects. Its intuitive user interface lets you visually manage tasks, task relationships, and resources in a project.
1515

@@ -27,4 +27,4 @@ The Gantt chart is a project management tool which provides a Microsoft Project-
2727
* Resources - Resources are represented by staff, equipment, materials, and more. We can show and allocate the resources for each task.
2828
* Filtering – Support for filtering individual column using menu filtering along with toolbar search box.
2929
* Data markers or indicators – Support for displaying indicators and flags along with taskbars and task labels.
30-
* Event markers and Holidays - Highlight important days or events in a project using event markers and define non-working days in a project using holidays.
30+
* Event markers and Holidays - Highlight important days or events in a project using event markers and define non-working days in a project using holidays.

ej2-asp-core-mvc/gantt/selection/selection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation: ug
99
---
1010

1111

12-
# Selection
12+
# Selection in ##Platform_Name## Gantt component
1313

1414
Selection provides an option to highlight a row or a cell. It can be done using arrow keys or by scrolling down the mouse. To disable selection in the Gantt control, set the [`AllowSelection`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.Gantt.Gantt~AllowSelection.html) to false.
1515

@@ -179,4 +179,4 @@ The touch interaction feature in the Gantt component allows you to easily intera
179179

180180
[`Multiple Row Selection`](selection/#multiple-row-selection) : To select multiple rows, you can utilize the multi-row selection feature. When you tap on a row, a popup is displayed, indicating the option for multi-row selection. Tap on the popup, and then proceed to tap on the desired rows you want to select. This allows you to select and interact with multiple rows simultaneously, as shown in the following image:
181181

182-
![Multiple selection](../images/multiple-selection.PNG)
182+
![Multiple selection](../images/multiple-selection.PNG)
Loading
Loading

ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/getting-started-with-server-backed.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,7 @@ namespace GettingStartedMVC.Controllers
389389
public string tileXCount { get; set; }
390390
public string tileYCount { get; set; }
391391
public bool digitalSignaturePresent { get; set; }
392-
}
393-
392+
}
394393
}
395394

396395
{% endhighlight %}

0 commit comments

Comments
 (0)