Skip to content

Commit 5a5c7b4

Browse files
Merge pull request #3788 from syncfusion-content/RTE-Image-Insertion-Access-Code-hotfix
991428- Added a file manager access code for RichTextEditor control in MacCatalyst device [hotfix]
2 parents 07a4c66 + ce3db2d commit 5a5c7b4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ documentation: ug
1111

1212
The [SfRichTextEditor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.RichTextEditor.SfRichTextEditor.html) supports inserting images (JPEG, PNG) into the content area. Images can be added by the end-user through the toolbar or programmatically from various sources like a stream or a file path.
1313

14+
**Enable File Access Permission**
15+
16+
On MacCatalyst devices, you need to enable file access by adding the required permission in the platform specific "Entitlements.plist" file, as illustrated in the following code snippet.
17+
18+
{% tabs %}
19+
{% highlight C# tabtitle="Entitlements.plist" %}
20+
21+
<key>com.apple.security.files.user-selected.read-write</key>
22+
<true/>
23+
24+
{% endhighlight %}
25+
{% endtabs %}
26+
1427
## Insert an image from the gallery
1528

1629
When the user taps the Image toolbar button, the [ImageRequested](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.RichTextEditor.SfRichTextEditor.html#Syncfusion_Maui_RichTextEditor_SfRichTextEditor_ImageRequested) event is triggered. You can handle this event to open the device's media gallery and insert the selected image. .NET MAUI provides a built-in `IsHandled` API to select photos from the gallery.

0 commit comments

Comments
 (0)