Skip to content

Commit 6ad3eb1

Browse files
author
Sorita Heng
committed
Update Blazor Tiny Cloud page
1 parent 791c47b commit 6ad3eb1

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

modules/ROOT/partials/integrations/blazor-postinstall.adoc

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,38 @@ _File:_ `+BlazorApp.csproj+`
99
</ItemGroup>
1010
----
1111
. Add the `+tinymce-blazor.js+` script to the main page.
12-
* Using Blazor Server add the script in `+Pages/_Host.cshtml+`, for example:
12+
* If using the Blazor Web App, add the script in `+Components/App.razor+`, for example:
13+
+
14+
[source,html]
15+
----
16+
<script src="_framework/blazor.web.js"></script>
17+
<script src="_content/TinyMCE.Blazor/tinymce-blazor.js"></script>
18+
----
19+
20+
[NOTE]
21+
The location of the script depends on the type of Blazor app, including Blazor Server and Blazor WebAssembly (WASM) which are not covered in this guide.
22+
23+
* If using Blazor Server, add the script in `+Pages/_Host.cshtml+`, for example:
1324
+
1425
[source,html]
1526
----
1627
<script src="_framework/blazor.server.js"></script>
1728
<script src="_content/TinyMCE.Blazor/tinymce-blazor.js"></script>
1829
----
19-
* Using WASM add the script in `+wwwroot/index.html+`, for example:
30+
* If using WASM, add the script in `+wwwroot/index.html+`, for example:
2031
+
2132
[source,html]
2233
----
2334
<script src="_content/TinyMCE.Blazor/tinymce-blazor.js"></script>
2435
<script src="_framework/blazor.webassembly.js"></script>
2536
----
26-
. Add the `+Editor+` component to a page by either:
37+
38+
. Add the `+Editor+` component to a page by either:
2739
* Using the `+using+` directive
2840
+
2941
[source,cs]
3042
----
43+
@rendermode InteractiveServer
3144
@using TinyMCE.Blazor
3245
<Editor />
3346
----
@@ -45,12 +58,15 @@ _File:_ `+Pages/Index.razor+`
4558
[source,cs]
4659
----
4760
@page "/"
61+
@rendermode InteractiveServer
4862
@using TinyMCE.Blazor
4963
5064
<h1>Hello, world!</h1>
5165
Welcome to your new app.
5266
<Editor />
5367
----
68+
[IMPORTANT]
69+
In a Blazor Web App, different render modes determine how components are rendered and how interactivity is handled. To enable JavaScript interactivity, ensure that `+@rendermode InteractiveServer+` is specified in a page component.
5470

5571
ifeval::["{productSource}" != "cloud"]
5672

modules/ROOT/partials/integrations/blazor-quick-start.adoc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ The https://github.com/tinymce/tinymce-blazor[Official {productname} Blazor comp
22

33
Select from the following guides:
44

5+
* xref:using-visual-studio-code[Using Visual Studio Code (VS Code)]
56
* xref:using-visual-studio[Using Visual Studio]
67
* xref:using-a-command-prompt-or-terminal[Using a command prompt or terminal]
78
9+
[[using-visual-studio-code]]
10+
== Using Visual Studio Code (VS Code)
11+
812
[[using-visual-studio]]
913
== Using Visual Studio
1014

@@ -18,7 +22,7 @@ This procedure requires:
1822
=== Procedure
1923

2024
. On the Visual Studio toolbar, click the https://docs.microsoft.com/en-us/visualstudio/ide/create-new-project[*New Project* button].
21-
. Select the *Blazor Server App* template.
25+
. Select the *Blazor Web App* template and name the project 'BlazorApp'.
2226
. Use the NuGet package manager console to install the `+TinyMCE.Blazor+` package, such as:
2327
+
2428
[source,sh]
@@ -55,7 +59,7 @@ This procedure requires:
5559
+
5660
[source,sh]
5761
----
58-
dotnet new blazorserver -o BlazorApp --no-https
62+
dotnet new blazor -o BlazorApp --no-https
5963
----
6064
. Change into the new application directory:
6165
+
@@ -90,7 +94,7 @@ include::partial$integrations/blazor-postinstall.adoc[]
9094
dotnet watch run
9195
----
9296
+
93-
This will start a local development server, accessible at http://localhost:5000.
97+
This will start a local development server accessible at `http://localhost:{PORT}`, where `{PORT}` is specified in the project's `+Properties/launchSettings.json+` file.
9498
* To stop the development server, select on the command line or command prompt and press _Ctrl+C_.
9599

96100
== Next Steps

0 commit comments

Comments
 (0)