You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/partials/integrations/blazor-postinstall.adoc
+27-11Lines changed: 27 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,21 @@
1
-
. Verify the installation by checking the `+ItemGroup+` references in `+BlazorApp.csproj+`, such as:
2
-
+
3
-
_File:_`+BlazorApp.csproj+`
1
+
. Verify the installation by checking the `+ItemGroup+` references in the project file. For example, if the project is named _BlazorApp_, the relevant file would be `+BlazorApp.csproj+` with the dependency referenced as follows:
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
20
23
21
* If using Blazor Server, add the script in `+Pages/_Host.cshtml+`, for example:
@@ -34,17 +32,33 @@ The location of the script depends on the type of Blazor app, including Blazor S
. Add the `+Editor+` component to a page by either:
39
-
* Using the `+using+` directive
38
+
. Add the `+Editor+` component to a page by either:
39
+
* Using the `+using+` directive:
40
+
+
41
+
[source,cs]
42
+
----
43
+
@using TinyMCE.Blazor
44
+
<Editor />
45
+
----
46
+
+
47
+
For example:
48
+
+
49
+
_File:_`+Pages/Index.razor+`
40
50
+
41
51
[source,cs]
42
52
----
53
+
@page "/"
43
54
@rendermode InteractiveServer
44
55
@using TinyMCE.Blazor
56
+
57
+
<h1>Hello, world!</h1>
58
+
Welcome to your new app.
45
59
<Editor />
46
60
----
47
-
* Using the full component and package name
61
+
* Using the component with its namespace:
48
62
+
49
63
[source,cs]
50
64
----
@@ -64,9 +78,11 @@ _File:_ `+Pages/Index.razor+`
64
78
<h1>Hello, world!</h1>
65
79
Welcome to your new app.
66
80
<Editor />
67
-
----
81
+
----
82
+
+
68
83
[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.
84
+
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.
* https://learn.microsoft.com/en-us/visualstudio/subscriptions/vs-c-sharp-dev-kit[C# Dev Kit VS Code Extension^]
19
+
20
+
Alternatively, the https://learn.microsoft.com/en-us/dotnet/core/install/windows#install-with-visual-studio-code[.NET WinGet Configuration file^] can be downloaded to install the necessary dependencies.
21
+
22
+
=== Procedure
23
+
24
+
. In VS Code, open the Command Palette by pressing `+Ctrl+Shift+P+`. Find `.NET: New Project` and select it to create a new project.
25
+
. Select *Blazor Web App* from the list of templates and follow the steps to set up the project.
26
+
. Using the Command Palette, find and select `.NuGet: Add NuGet Package`. Enter `+TinyMCE.Blazor+` and select the package along with the version to install.
27
+
28
+
ifeval::["{productSource}" == "package-manager"]
29
+
30
+
. To use the self-hosted version of `{productName}`, install the `{productname}` package from the Command Pallette.
0 commit comments