Skip to content

Commit da4dda2

Browse files
Merge branch 'development' into EJ2-895411-dev
2 parents 8e3bf12 + 2e0e9f0 commit da4dda2

File tree

38 files changed

+689
-108
lines changed

38 files changed

+689
-108
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':
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public ActionResult FabStyles()
2+
{
3+
return View();
4+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Buttons
2+
3+
<div id="target" style="min-height:200px; position:relative; width:300px; border:1px solid;">
4+
@Html.EJS().Fab("fab").Target("#target").IconCss("e-icons e-people").Content("Contact").CssClass("custom-css").Render()
5+
</div>
6+
<style>
7+
.custom-css.e-fab.e-btn {
8+
border-color: darkgrey;
9+
border-width: 4px;
10+
}
11+
</style>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@using Syncfusion.EJ2.Buttons
2+
3+
<div id="target" style="min-height:200px; position:relative; width:300px; border:1px solid;">
4+
<ejs-fab id="fab" target="#target" cssClass="custom-css" iconCss="e-icons e-people" content="Contact"></ejs-fab>
5+
</div>
6+
<style>
7+
.custom-css.e-fab.e-btn {
8+
border-color: darkgrey;
9+
border-width: 4px;
10+
}
11+
</style>

ej2-asp-core-mvc/code-snippet/pivot-table/getting-start-mvc/fieldlist/razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@model List<PivotTableSample.Controllers.PivotData>
22

3-
@Html.EJS().PivotView("PivotView").Height("300").DataSourceSettings(dataSource => dataSource.DataSource((IEnumerable<object>)ViewBag.DataSource).ExpandAll(false).EnableSorting(true).AllowLabelFilter(true).AllowValueFilter(true)
3+
@Html.EJS().PivotView("PivotView").Height("300").DataSourceSettings(dataSource => dataSource.DataSource((IEnumerable<object>)Model).ExpandAll(false).EnableSorting(true).AllowLabelFilter(true).AllowValueFilter(true)
44
.FormatSettings(formatsettings =>
55
{
66
formatsettings.Name("Amount").Format("C0").MaximumSignificantDigits(10).MinimumSignificantDigits(1).UseGrouping(true).Add();

0 commit comments

Comments
 (0)