Skip to content

Commit 542aef0

Browse files
commit
1 parent 625b9aa commit 542aef0

File tree

1 file changed

+116
-0
lines changed

1 file changed

+116
-0
lines changed

MAUI/Rich-Text-Editor/Getting-Started.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,122 @@ namespace RichTextEditorSample
243243
{% endtabs %}
244244

245245
{% endtabcontent %}
246+
247+
{% tabcontent JetBrains Rider %}
248+
249+
## Prerequisites
250+
251+
Before proceeding, ensure the following are set up:
252+
253+
1. Ensure you have the latest version of JetBrains Rider.
254+
2. Install [.NET 8 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) or later is installed.
255+
3. Make sure the MAUI workloads are installed and configured as described [here.](https://www.jetbrains.com/help/rider/MAUI.html#before-you-start)
256+
257+
## Step 1: Create a new .NET MAUI Project
258+
259+
1. Go to **File > New Solution,** Select .NET (C#) and choose the .NET MAUI App template.
260+
2. Enter the Project Name, Solution Name, and Location.
261+
3. Select the .NET framework version and click Create.
262+
263+
## Step 2: Install the Syncfusion<sup>®</sup> MAUI RichTextEditor NuGet Package
264+
265+
1. In **Solution Explorer,** right-click the project and choose **Manage NuGet Packages.**
266+
2. Search for [Syncfusion.Maui.Core](https://www.nuget.org/packages/Syncfusion.Maui.Core) and install the latest version.
267+
3. Ensure the necessary dependencies are installed correctly, and the project is restored. If not, Open the Terminal in Rider and manually run: `dotnet restore`
268+
269+
## Step 3: Register the handler
270+
271+
Syncfusion.Maui.Core nuget is a dependent package for all Syncfusion<sup>®</sup> controls of .NET MAUI. In the **MauiProgram.cs** file, register the handler for Syncfusion<sup>®</sup> core.
272+
273+
{% tabs %}
274+
{% highlight C# tabtitle="MauiProgram.cs" hl_lines="6 17" %}
275+
276+
using Microsoft.Maui;
277+
using Microsoft.Maui.Hosting;
278+
using Microsoft.Maui.Controls.Compatibility;
279+
using Microsoft.Maui.Controls.Hosting;
280+
using Microsoft.Maui.Controls.Xaml;
281+
using Syncfusion.Maui.Core.Hosting;
282+
283+
namespace ChartGettingStarted
284+
{
285+
public static class MauiProgram
286+
{
287+
public static MauiApp CreateMauiApp()
288+
{
289+
var builder = MauiApp.CreateBuilder();
290+
builder
291+
.UseMauiApp<App>()
292+
.ConfigureSyncfusionCore()
293+
.ConfigureFonts(fonts =>
294+
{
295+
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
296+
});
297+
298+
return builder.Build();
299+
}
300+
}
301+
}
302+
303+
{% endhighlight %}
304+
{% endtabs %}
305+
306+
## Step 4: Add a Basic Rich Text Editor
307+
308+
Step 1: Add the namespace as shown in the following code sample.
309+
310+
{% tabs %}
311+
{% highlight xaml %}
312+
313+
xmlns:rte="clr-namespace:Syncfusion.Maui.RichTextEditor;assembly=Syncfusion.Maui.RichTextEditor"
314+
315+
{% endhighlight %}
316+
{% highlight c# %}
317+
318+
using Syncfusion.Maui.RichTextEditor;
319+
320+
{% endhighlight %}
321+
{% endtabs %}
322+
323+
Step 2: Add the [SfRichTextEditor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.RichTextEditor.SfRichTextEditor.html) control with a required optimal name using the included namespace.
324+
325+
{% tabs %}
326+
327+
{% highlight xaml %}
328+
329+
<?xml version="1.0" encoding="utf-8" ?>
330+
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
331+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
332+
xmlns:rte="clr-namespace:Syncfusion.Maui.RichTextEditor;assembly=Syncfusion.Maui.RichTextEditor"
333+
x:Class="RichTextEditorSample.MainPage">
334+
<Grid>
335+
<rte:SfRichTextEditor />
336+
</Grid>
337+
</ContentPage>
338+
339+
{% endhighlight %}
340+
341+
{% highlight C# %}
342+
343+
using Syncfusion.Maui.RichTextEditor;
344+
345+
namespace RichTextEditorSample
346+
{
347+
public partial class MainPage : ContentPage
348+
{
349+
public MainPage()
350+
{
351+
InitializeComponent();
352+
SfRichTextEditor richTextEditor = new SfRichTextEditor();
353+
this.Content = richTextEditor;
354+
}
355+
}
356+
}
357+
358+
{% endhighlight %}
359+
360+
{% endtabs %}
361+
246362
{% endtabcontents %}
247363

248364
## Enable the Toolbar

0 commit comments

Comments
 (0)