Skip to content

Commit 12315e7

Browse files
authored
Committed the example project.
1 parent 1a48daa commit 12315e7

File tree

79 files changed

+74911
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+74911
-2
lines changed

MyCoreProject.csproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Syncfusion.EJ2.AspNet.Core" Version="28.1.36" />
11+
</ItemGroup>
12+
13+
</Project>

MyCoreProject.csproj.user

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<ActiveDebugProfile>https</ActiveDebugProfile>
5+
</PropertyGroup>
6+
</Project>

MyCoreProject.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.11.35312.102
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyCoreProject", "MyCoreProject.csproj", "{D7616508-2A73-45C9-A15B-27540AFED6F5}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{D7616508-2A73-45C9-A15B-27540AFED6F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{D7616508-2A73-45C9-A15B-27540AFED6F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{D7616508-2A73-45C9-A15B-27540AFED6F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{D7616508-2A73-45C9-A15B-27540AFED6F5}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {E9EDA639-A233-4FB4-91BD-FAEDE0892356}
24+
EndGlobalSection
25+
EndGlobal

Pages/Error.cshtml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
@page
2+
@model ErrorModel
3+
@{
4+
ViewData["Title"] = "Error";
5+
}
6+
7+
<h1 class="text-danger">Error.</h1>
8+
<h2 class="text-danger">An error occurred while processing your request.</h2>
9+
10+
@if (Model.ShowRequestId)
11+
{
12+
<p>
13+
<strong>Request ID:</strong> <code>@Model.RequestId</code>
14+
</p>
15+
}
16+
17+
<h3>Development Mode</h3>
18+
<p>
19+
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
20+
</p>
21+
<p>
22+
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
23+
It can result in displaying sensitive information from exceptions to end users.
24+
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
25+
and restarting the app.
26+
</p>

Pages/Error.cshtml.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
using System.Diagnostics;
4+
5+
namespace MyCoreProject.Pages
6+
{
7+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
8+
[IgnoreAntiforgeryToken]
9+
public class ErrorModel : PageModel
10+
{
11+
public string? RequestId { get; set; }
12+
13+
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
14+
15+
private readonly ILogger<ErrorModel> _logger;
16+
17+
public ErrorModel(ILogger<ErrorModel> logger)
18+
{
19+
_logger = logger;
20+
}
21+
22+
public void OnGet()
23+
{
24+
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
25+
}
26+
}
27+
28+
}

Pages/Index.cshtml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
@page
2+
@model Pages.IndexModel
3+
4+
@{
5+
var omegaToolbarItem = new
6+
{
7+
template = @"<button class='e-tbar-btn' onclick='addOmegaSymbol()'>
8+
<div style='font-size: 18px'>&#937</div>
9+
</button>",
10+
tooltipText = "Insert Symbol",
11+
};
12+
13+
var tools = new object[] {
14+
"Bold", "Italic", "Underline", "StrikeThrough", "InlineCode", "SuperScript", "SubScript",
15+
"|", "Formats", "Alignments", "OrderedList", "UnorderedList", "|", "CreateLink", "Image",
16+
"|", "Undo", "Redo", "SourceCode", "FullScreen", omegaToolbarItem
17+
};
18+
19+
var link = new object[] { "Open" };
20+
}
21+
<div class="rte-container">
22+
<ejs-richtexteditor id="rte" width="70%" floatingToolbarOffset="50">
23+
<e-richtexteditor-toolbarsettings items="@tools" type="Scrollable" enableFloating="false" />
24+
<e-richtexteditor-inlinemode enable="true" onSelection="false"></e-richtexteditor-inlinemode>
25+
<e-richtexteditor-quicktoolbarsettings link="@link"/>
26+
<e-content-template>
27+
<p>
28+
The <a href="https://www.syncfusion.com/aspnet-core-ui-controls/wysiwyg-rich-text-editor">Rich Text Editor</a> control is WYSIWYG ('what you see is what you get') editor that provides the best user experience to create and update the content.
29+
Users can format their content using standard toolbar commands.
30+
</p>
31+
<p><b> Key features:</b></p>
32+
<ul>
33+
<li><p> Provides &lt; IFRAME &gt; and &lt; DIV &gt; modes </p></li>
34+
<li><p> Capable of handling markdown editing.</p></li>
35+
<li><p> Contains a modular library to load the necessary functionality on demand.</p></li>
36+
<li><p> Provides a fully customizable toolbar.</p></li>
37+
<li><p> Provides HTML view to edit the source directly for developers.</p></li>
38+
</ul>
39+
<img src='https://cdn.syncfusion.com/ej2/richtexteditor-resources/RTE-Portrait.png'
40+
style='width: 300px; height: 300px;' alt='Sky' />
41+
</e-content-template>
42+
</ejs-richtexteditor>
43+
</div>
44+
<script>
45+
function addOmegaSymbol(){
46+
var rte = document.getElementById('rte').ej2_instances[0];
47+
48+
if (rte.formatter.getUndoRedoStack().length === 0) {
49+
rte.formatter.saveData();
50+
}
51+
rte.executeCommand('insertText', 'Ω');
52+
rte.formatter.saveData();
53+
rte.formatter.enableUndo(rte);
54+
}
55+
</script>
56+
<style>
57+
.rte-container{
58+
display: flex;
59+
justify-content: center;
60+
}
61+
</style>

Pages/Index.cshtml.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
4+
namespace MyCoreProject.Pages
5+
{
6+
public class IndexModel : PageModel
7+
{
8+
private readonly ILogger<IndexModel> _logger;
9+
10+
public IndexModel(ILogger<IndexModel> logger)
11+
{
12+
_logger = logger;
13+
}
14+
}
15+
}

Pages/Privacy.cshtml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@page
2+
@model PrivacyModel
3+
@{
4+
ViewData["Title"] = "Privacy Policy";
5+
}
6+
<h1>@ViewData["Title"]</h1>
7+
8+
<p>Use this page to detail your site's privacy policy.</p>

Pages/Privacy.cshtml.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
4+
namespace MyCoreProject.Pages
5+
{
6+
public class PrivacyModel : PageModel
7+
{
8+
private readonly ILogger<PrivacyModel> _logger;
9+
10+
public PrivacyModel(ILogger<PrivacyModel> logger)
11+
{
12+
_logger = logger;
13+
}
14+
15+
public void OnGet()
16+
{
17+
}
18+
}
19+
20+
}

Pages/Shared/_Layout.cshtml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>@ViewData["Title"] - MyCoreProject</title>
7+
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
8+
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
9+
<link rel="stylesheet" href="~/MyCoreProject.styles.css" asp-append-version="true" />
10+
<!-- Syncfusion ASP.NET Core controls styles -->
11+
<link rel="stylesheet" href="https://cdn.syncfusion.com/ej2/27.2.2/fluent.css" />
12+
<!-- Syncfusion ASP.NET Core controls scripts -->
13+
<script src="https://cdn.syncfusion.com/ej2/27.2.2/dist/ej2.min.js"></script>
14+
</head>
15+
<body>
16+
<header>
17+
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
18+
<div class="container">
19+
<a class="navbar-brand" asp-area="" asp-page="/Index">MyCoreProject</a>
20+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
21+
aria-expanded="false" aria-label="Toggle navigation">
22+
<span class="navbar-toggler-icon"></span>
23+
</button>
24+
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
25+
<ul class="navbar-nav flex-grow-1">
26+
<li class="nav-item">
27+
<a class="nav-link text-dark" asp-area="" asp-page="/Index">Home</a>
28+
</li>
29+
<li class="nav-item">
30+
<a class="nav-link text-dark" asp-area="" asp-page="/Privacy">Privacy</a>
31+
</li>
32+
</ul>
33+
</div>
34+
</div>
35+
</nav>
36+
</header>
37+
<div class="container">
38+
<main role="main" class="pb-3">
39+
@RenderBody()
40+
</main>
41+
</div>
42+
43+
<footer class="border-top footer text-muted">
44+
<div class="container">
45+
&copy; 2024 - MyCoreProject - <a asp-area="" asp-page="/Privacy">Privacy</a>
46+
</div>
47+
</footer>
48+
49+
<script src="~/lib/jquery/dist/jquery.min.js"></script>
50+
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
51+
<script src="~/js/site.js" asp-append-version="true"></script>
52+
@await RenderSectionAsync("Scripts", required: false)
53+
<ejs-scripts></ejs-scripts>
54+
</body>
55+
</html>

0 commit comments

Comments
 (0)