Telerik UI for Xamarin's rich text editor control-building mobile application native UI

Telerik UI for Xamarin latest version download

Telerik UI for Xamarin is a native UI for building cross-platform mobile applications. Telerik UI for Xamarin uses Xamarin.Forms technology, which allows developers to create native iOS, Android and Windows Phone applications from a single shared C# code base. Not only that, UI for Xamarin is built on the native controls of iOS and Android, and provides real native UI for Xamarin users' applications.

Telerik UI for Xamarin's rich text editor control-building mobile application native UI

In the latest version released by Telerik UI for Xamarin in 2020, two new controls have been introduced: RichTextEditor (beta) and ComboBox .

Telerik RichTextEditor for Xamarin allows users to create rich text content through the "what you see is what you get" (WYSIWYG) interface. The control has various editing functions. With the help of RadRichTextEditorToolbar, you can provide users with a quick and easy Method to edit its HTML content. The default toolbar contains all available text formatting options, but you can also customize the displayed editing options as needed.

RichTextEditor has multiple use cases, as a mail client-if you want to send an email and want to edit, please set the text format. As a text editing application-Import documents into an application to edit, format text, or add other information to the document.

Display HTML content

You can easily display HTML content, including paragraphs, formatted text, images, tables, ordered and unordered lists.

Various HTML source options

You can load HTML source code from strings and streams.

Load HTML from string:

 

var htmlSource = @"<h4>RichTextEditor for Xamarin - Overview</h4>
<p><strong>RichTextEditor</strong> enables users to create rich textual content through a What-You-See-Is-What-You-Get (WYSIWYG) interface.</p>";
this.richTextEditor.Source = RichTextSource.FromString(htmlSource);

 

Load HTML from the stream:

 

Func<CancellationToken, Task<Stream>> streamFunc = ct => Task.Run(() =>
{
Assembly assembly = typeof(KeyFeatures).Assembly;
string fileName = assembly.GetManifestResourceNames().FirstOrDefault(n => n.Contains("richtexteditor-htmlsource.html"));
Stream stream = assembly.GetManifestResourceStream(fileName);
return stream;
});

this.richTextEditor.Source = RichTextSource.FromStream(streamFunc);

 

Various editing functions

  • Text format, such as bold, italic, underline, and strikethrough
  • Font operations, such as size, font, text color, and text background color
  • Bulleted and numbered lists
  • Text selection
  • Hyperlink manipulation-create, edit and delete hyperlinks
  • Subscript and superscript format
  • Indentation and content alignment
  • Undo/redo editing operations

RichTextEditor toolbar

The control is equipped with a predefined user interface, which is automatically connected with all the commands provided by the control's built-in functions. The default toolbar contains all available text formatting options, but you can customize the displayed editing options as needed.

 

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions> 
<telerikRichTextEditor:RadRichTextEditorToolbar x:Name="richTextToolbar" RichTextEditor="{x:Reference richTextEditor}" />
<telerikRichTextEditor:RadRichTextEditor x:Name="richTextEditor" Grid.Row="1" />
</Grid>

 

Telerik UI for Xamarin's rich text editor control-building mobile application native UI

Read-only status

The IsReadOnly (bool) property of RichTextEditor indicates whether the control is in read-only mode. Setting IsReadOnly = "True" means that toolbar items will be disabled, the content of the document cannot be changed, and selections cannot be performed.

Telerik UI for Xamarin's rich text editor control-building mobile application native UI

Command support

The control exposes commands such as ToggleBoldCommand, ToggleBulletingCommand, AlignRightCommand, etc. These commands allow you to perform rich text editing operations on the content loaded into the editor.

Flexible style API

You can modify the visual appearance and toolbar items of RadRichTextEditor through various style properties (such as BackgroundColor, BorderColor and Thickness, CornerRadius, etc.).

Telerik UI for Xamarin's rich text editor control-building mobile application native UI


For the latest news of Kendo UI, please follow Telerik Chinese website!

Guess you like

Origin blog.csdn.net/AABBbaby/article/details/112648064