Skip to content

Commit d515917

Browse files
Revert unnecessary code changes.
1 parent 92456e6 commit d515917

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

MAUI/Rich-Text-Editor/AutoSize.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,36 @@ The following example demonstrates how to place an auto-sizing [SfRichTextEditor
1919

2020
{% highlight xaml %}
2121

22-
<VerticalStackLayout>
23-
<rte:SfRichTextEditor x:Name="richTextEditor"
24-
EnableAutoSize="True"/>
25-
</VerticalStackLayout>
22+
<rte:SfRichTextEditor EnableAutoSize="True" />
2623

2724
{% endhighlight %}
2825

2926
{% highlight c# %}
3027

31-
VerticalStackLayout verticalStackLayout = new VerticalStackLayout();
3228
SfRichTextEditor richTextEditor = new SfRichTextEditor();
3329
richTextEditor.EnableAutoSize = true;
34-
verticalStackLayout.Children.Add(richTextEditor);
35-
this.Content = verticalStackLayout;
3630

3731
{% endhighlight %}
3832
{% endtabs %}
3933

40-
The editor will now automatically resize to match the content's height.
34+
When `EnableAutoSize` is active, the editor’s height will grow or shrink as content is added or removed.
4135

4236
![.NET MAUI Rich Text Editor with AutoSize enabled](images/richtexteditor-autosize.gif)
4337

44-
N> When using `EnableAutoSize`, it is recommended not to set the `HeightRequest` property on the `SfRichTextEditor`, as this may interfere with the automatic resizing behavior.
38+
N> When using `EnableAutoSize`, it is recommended not to set the `HeightRequest` property on the `SfRichTextEditor`, as this may interfere with the automatic resizing behavior. For the best results, place the editor within a layout that can accommodate its changing height, such as a `VerticalStackLayout` inside a `ScrollView`.
39+
40+
The following example demonstrates how to place an auto-sizing `SfRichTextEditor` within a `ScrollView`.
41+
42+
{% tabs %}
43+
{% highlight xaml %}
44+
<ScrollView>
45+
<VerticalStackLayout>
46+
<Label Text="User Feedback" FontSize="Title" Padding="10"/>
47+
<rte:SfRichTextEditor x:Name="richTextEditor"
48+
EnableAutoSize="True"
49+
Placeholder="Please provide your detailed feedback here..."/>
50+
<Button Text="Submit" Margin="10"/>
51+
</VerticalStackLayout>
52+
</ScrollView>
53+
{% endhighlight %}
54+
{% endtabs %}

MAUI/Rich-Text-Editor/Customization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ Use the [RemoveHyperlink(string text, string Url)](https://help.syncfusion.com/c
312312
{% highlight c# %}
313313

314314
// Remove a specific hyperlink, keeping its text
315-
richTextEditor.RemoveHyperlink("Example", "https://www.google.com/");
315+
richTextEditor.RemoveHyperlink("Syncfusion", "https://www.google.com/");
316316

317317
{% endhighlight %}
318318
{% endtabs %}

MAUI/Rich-Text-Editor/Image-Insertion.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ private async void OnImageInserting(object sender, RichTextEditorImageRequestedE
3333
RichTextEditorImageSource richTextEditorImageSource = new();
3434
richTextEditorImageSource.ImageFormat = RichTextEditorImageFormat.Base64;
3535
richTextEditorImageSource.Source =ImageSource.FromUri(new Uri("https://aka.ms/campus.jpg"));
36-
richTextEditorImageSource.Width = 250;
37-
richTextEditorImageSource.Height = 100;
36+
richTextEditorImageSource.Width = 100;
37+
richTextEditorImageSource.Height = 20;
3838
richTextEditor.InsertImage(richTextEditorImageSource);
3939
}
4040

0 commit comments

Comments
 (0)