Skip to content

Commit 7ccbc14

Browse files
authored
Committed the example project.
1 parent 9bb6fa4 commit 7ccbc14

File tree

81 files changed

+83079
-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.

81 files changed

+83079
-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>net9.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.33" />
11+
</ItemGroup>
12+
13+
</Project>

MyCoreProject.sln

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.12.35527.113 d17.12
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyCoreProject", "MyCoreProject.csproj", "{08E5D453-D8EB-4BEE-8683-C686D642908D}"
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+
{08E5D453-D8EB-4BEE-8683-C686D642908D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{08E5D453-D8EB-4BEE-8683-C686D642908D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{08E5D453-D8EB-4BEE-8683-C686D642908D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{08E5D453-D8EB-4BEE-8683-C686D642908D}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
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 System.Diagnostics;
2+
using Microsoft.AspNetCore.Mvc;
3+
using Microsoft.AspNetCore.Mvc.RazorPages;
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: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@page
2+
@model IndexModel
3+
4+
@{
5+
var Tools = new[] { "Bold", "Italic", "|", "Undo", "Redo", "CreateTable", "Image" };
6+
7+
string Value = @"***Overview***
8+
The Rich Text Editor control is WYSIWYG('what you see is what you get') editor used to create and edit the content and return valid HTML markup or markdown(MD) of the content. The editor provides a standard toolbar to format content using its commands. Modular library features to load the necessary functionality on demand. The toolbar contains commands to align the text, insert link, insert image, insert list, undo / redo operation, HTML view, and more.
9+
10+
* **Key features * **
11+
-*Mode *: Provides IFRAME and DIV mode.
12+
- *Module *: Modular library to load the necessary functionality on demand.
13+
- *Toolbar *: Provide a fully customizable toolbar.
14+
- *Editing *: HTML view to edit the source directly for developers.
15+
- *Third - party Integration *: Supports to integrate third - party library.
16+
- *Preview *: Preview the modified content before saving it.
17+
- *Tools *: Handling images, hyperlinks, video, uploads and more.
18+
- *Undo and Redo *: Undo / redo manager.
19+
- *Lists *:Creates bulleted and numbered list.";
20+
}
21+
22+
<ejs-button id="btn" content="Get Value" onclick="onBtnClick()"></ejs-button>
23+
<ejs-richtexteditor id="rte" value="@Value" editorMode="Markdown">
24+
<e-richtexteditor-toolbarsettings items="@Tools"></e-richtexteditor-toolbarsettings>
25+
</ejs-richtexteditor>
26+
27+
<script>
28+
function onBtnClick(){
29+
alert(document.getElementById('rte').ej2_instances[0].value);
30+
}
31+
</script>

Pages/Index.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 IndexModel : PageModel
7+
{
8+
private readonly ILogger<IndexModel> _logger;
9+
10+
public IndexModel(ILogger<IndexModel> logger)
11+
{
12+
_logger = logger;
13+
}
14+
15+
public void OnGet()
16+
{
17+
18+
}
19+
}
20+
}

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+
<script type="importmap"></script>
8+
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
9+
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
10+
<link rel="stylesheet" href="~/MyCoreProject.styles.css" asp-append-version="true" />
11+
<link rel="stylesheet" href="https://cdn.syncfusion.com/ej2/27.2.4/fluent.css" />
12+
<script src="https://cdn.syncfusion.com/ej2/27.2.4/dist/ej2.min.js"></script>
13+
</head>
14+
<body>
15+
<header>
16+
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
17+
<div class="container">
18+
<a class="navbar-brand" asp-area="" asp-page="/Index">MyCoreProject</a>
19+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
20+
aria-expanded="false" aria-label="Toggle navigation">
21+
<span class="navbar-toggler-icon"></span>
22+
</button>
23+
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
24+
<ul class="navbar-nav flex-grow-1">
25+
<li class="nav-item">
26+
<a class="nav-link text-dark" asp-area="" asp-page="/Index">Home</a>
27+
</li>
28+
<li class="nav-item">
29+
<a class="nav-link text-dark" asp-area="" asp-page="/Privacy">Privacy</a>
30+
</li>
31+
</ul>
32+
</div>
33+
</div>
34+
</nav>
35+
</header>
36+
<div class="container">
37+
<main role="main" class="pb-3">
38+
@RenderBody()
39+
</main>
40+
</div>
41+
42+
<footer class="border-top footer text-muted">
43+
<div class="container">
44+
&copy; 2024 - MyCoreProject - <a asp-area="" asp-page="/Privacy">Privacy</a>
45+
</div>
46+
</footer>
47+
48+
<script src="~/lib/jquery/dist/jquery.min.js"></script>
49+
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
50+
<script src="~/js/site.js" asp-append-version="true"></script>
51+
52+
@await RenderSectionAsync("Scripts", required: false)
53+
<ejs-scripts></ejs-scripts>
54+
</body>
55+
</html>

Pages/Shared/_Layout.cshtml.css

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/* Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification
2+
for details on configuring this project to bundle and minify static web assets. */
3+
4+
a.navbar-brand {
5+
white-space: normal;
6+
text-align: center;
7+
word-break: break-all;
8+
}
9+
10+
a {
11+
color: #0077cc;
12+
}
13+
14+
.btn-primary {
15+
color: #fff;
16+
background-color: #1b6ec2;
17+
border-color: #1861ac;
18+
}
19+
20+
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
21+
color: #fff;
22+
background-color: #1b6ec2;
23+
border-color: #1861ac;
24+
}
25+
26+
.border-top {
27+
border-top: 1px solid #e5e5e5;
28+
}
29+
.border-bottom {
30+
border-bottom: 1px solid #e5e5e5;
31+
}
32+
33+
.box-shadow {
34+
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
35+
}
36+
37+
button.accept-policy {
38+
font-size: 1rem;
39+
line-height: inherit;
40+
}
41+
42+
.footer {
43+
position: absolute;
44+
bottom: 0;
45+
width: 100%;
46+
white-space: nowrap;
47+
line-height: 60px;
48+
}

0 commit comments

Comments
 (0)