Numbering in Markdown editor mode isn't correct

Hello,

I am having a MAUI Hybrid project where I use Blazor's SfRichTextEditor inside a Webview.

I am testing this on Android. The editor mode I have set is "Markdown". When I type 1. First item and hit enter, I expect the number 2. to appear. But it continuously shows only the same number 1. for each line as shown below.

Is there a fix for this?


Image_9620_1711096514239


3 Replies

VJ Vinitha Jeyakumar Syncfusion Team March 25, 2024 12:11 PM UTC

Hi Gaut am Jain,



Your reported issue can be resolved by using the ListSyntax property with the RichTextEditorMarkdownOptions tag in RichTextEditor. Please check the code below,


Code snippet:

<SfRichTextEditor Height="250px" EditorMode="EditorMode.Markdown" >
   
    <RichTextEditorMarkdownOptions ListSyntax="@ListSyntax" />
    
</SfRichTextEditor>

@code  {
private Dictionary<string, string> ListSyntax { get; set; } = new Dictionary<string, string>()
{
    { "OL", "1., 2., 3." }
};
}


Regards,
Vinitha


GJ Gautam Jain March 25, 2024 02:25 PM UTC


Thanks a lot Vinitha.

This works great!

Since the custom format just assigned "2. " to the new format for OL, I didn't guess that we could write even comma separated values. May be the docs can be improved.

Wish you the best!



VJ Vinitha Jeyakumar Syncfusion Team March 26, 2024 04:50 AM UTC

Hi Gautam Jain,



You are welcome. We will consider improving the documentation.


Regards,

Vinitha


Loader.
Up arrow icon