We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

for RTL language like farsi or arabic the font family change in text property not working

I customized the document editor fonts with DocumentEditorSettings.


but the Calibri font always appears on the top of text font family drop down list.


when I writing a paragraph in RTL language like farsi or arabic the font not changed and remain in Calibri font


15 Replies

SM Suriya Murugan Syncfusion Team November 30, 2022 01:32 PM UTC

Ali, we will check and update details shortly.



SM Suriya Murugan Syncfusion Team December 8, 2022 10:40 AM UTC

Sorry for the delay, Ali.

For better validation, could you please share the code snippet that you used to customize the document editor's fonts?


Font family dropdown will update based on current selection.



AR ali reza December 19, 2022 12:54 PM UTC

this is my code 

    <SfDocumentEditorContainer ID="editor" @ref="container" EnableRtl="true" EnableToolbar="true" ShowPropertiesPane="true" LayoutType="LayoutType.Pages"

                                DocumentEditorSettings="EditorSettings" Height="100%" Width="100%" ToolbarItems="@Items" RestrictEditing="false" >

    <DocumentEditorContainerEvents Created="OnCreated" OnToolbarClick="onItemClick" ></DocumentEditorContainerEvents>

</SfDocumentEditorContainer>


@code{


    SfDocumentEditorContainer? container;

    List<Object> Items = new List<Object>() { new CustomToolbarItemModel() { Id = "fullscreen", Text = " fullscreen ", PrefixIcon = "fullScreenIcon" } , new CustomToolbarItemModel() { Id = "sizescreen", Text = "Sizescreen", PrefixIcon = "sizeScreenIcon" } ,"New", "Open", new CustomToolbarItemModel() { Id = "save", Text = "Save", PrefixIcon = "saveIcon" } , "Separator",new CustomToolbarItemModel() { Id = "paste", Text = "Paste", PrefixIcon = "pasteIcon" },new CustomToolbarItemModel() { Id = "copy", Text = "Copy", PrefixIcon = "copyIcon" }, "Separator", "Undo", "Redo", "Separator","Image", "Table", "Hyperlink", "Bookmark", "TableOfContents", "Separator","Header", "Footer", "PageSetup", "PageNumber", "Break", "InsertFootnote","InsertEndnote", "Separator","Find","Separator", "Comments", "TrackChanges", "Separator", "LocalClipboard", "RestrictEditing", "Separator", "FormFields", "UpdateFields" };

  DocumentEditorSettingsModel EditorSettings = new DocumentEditorSettingsModel() { FontFamilies = new string[8] { "_Nazanin", "_Nassim", "_Zar", "_Lotus", "_Tehran", "_Tanha", "_Vazir", "_Yekan" } };

    public void OnCreated(object args)

    {

        SfDocumentEditor editor = container.DocumentEditor;

        editor.Selection.CharacterFormat.SetFontFamilyAsync("_Yekan");

        editor.Selection.ParagraphFormat.SetLineSpacingTypeAsync(Syncfusion.Blazor.DocumentEditor.LineSpacingType.AtLeast);

        editor.Selection.ParagraphFormat.SetLineSpacingAsync(8);

        editor.Editor.InsertTextAsync(" ");

        container.DocumentEditor.Selection.ParagraphFormat.SetBidiAsync(true);

        editor.Selection.ParagraphFormat.SetTextAlignmentAsync(TextAlignment.Right);

    }

    public async void onItemClick(Syncfusion.Blazor.DocumentEditor.ClickEventArgs args)

    {

        switch (args.Item.Id)

        {

            case "save":

                SfDocumentEditor editor = container.DocumentEditor;

                String base64Data = await editor.SaveAsBlobAsync(FormatType.Docx);

                byte[] data = Convert.FromBase64String(base64Data);

                base64Data = null;

                //Word document file stream

                Stream stream = new MemoryStream(data);

                //To observe the memory go down, null out the reference of data variable.

                data = null;

                using (var fileStream = new FileStream(@"wwwroot/data/GettingStarted.docx", FileMode.Create, FileAccess.Write))

                {

                    //Saving the new file in root path of application

                    stream.CopyTo(fileStream);

                    fileStream.Close();

                }

                stream.Close();

                //To observe the memory go down, null out the reference of stream variable.

                stream = null;

                //(documentcontent["data"]);

                break;

            case "fullscreen":

                //await this.container.ResizeAsync(width: 700,height:700);

                styleInfo = "text-align:right;align-content:center;height:100%;Width:100%;display: block; ";

                await this.container.ResizeAsync();

                //container.Height(100 px);

                await this.container.DocumentEditor.ResizeAsync();

                break;

            case "sizescreen":

                //await this.container.ResizeAsync(width: 700,height:700);

                styleInfo = "text-align:right;align-content:center;height:50%;Width:50%;";

                await this.container.ResizeAsync();

                //container.Height(100 px);

                await this.container.DocumentEditor.ResizeAsync();

                break;

            case "copy":

                await this.container.DocumentEditor.Selection.CopyAsync();

                break;

            case "paste":

                await this.container.DocumentEditor.Editor.PasteAsync();

                break;

        }

    }

}



AR ali reza December 21, 2022 07:17 AM UTC

the cursor is so long hight




KM Kavitha Muralitharan Syncfusion Team December 21, 2022 11:41 AM UTC

Ali, We can reproduce the reported issue with provided document. Currently, we are validating and get back to you shortly



DS Dhanush Sekar Syncfusion Team December 23, 2022 12:12 PM UTC

Ali, we have confirmed the reported issue as a defect and logged a defect report. We will fix this issue in our EJ2 patch release, which is scheduled for second week of January 2023.

 

You can track the status of the bug through the below feedback link:

https://www.syncfusion.com/feedback/40019/resolve-the-selection-height-issue

 

Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”



AR ali reza December 25, 2022 06:51 AM UTC

when i click on your link shows access denied




AR ali reza December 25, 2022 07:18 AM UTC

i am updated the document editor to  20.4.0.38 but when i type with keyboard in document editor 

the font in rtl language like arabic or farsi not changing in font selector.in ltr language like english the font change is

corrected.

when i paste a paragraph  in rtl language like arabic or farsi  the font change  is corrected.



KM Kavitha Muralitharan Syncfusion Team December 27, 2022 01:44 PM UTC

Ali, The font get updated while changing  and  while pasting it.  If you have any doubt, Please refer to the attached video for your reference.


Attachment: FontVideo_b0ad582d.zip


SM Suriya Murugan Syncfusion Team December 28, 2022 04:10 AM UTC

Ali, ## when i click on your link shows access denied


We have added you to access the feedback portal. Kindly clear your cache and try again. Please log off and login with your Syncfusion credentials. Let us know if the issue still persists.



KM Kavitha Muralitharan Syncfusion Team January 13, 2023 07:16 AM UTC

Hi Ali,


we are glad to announce that our patch release (v20.4.43is rolled out successfully. In this release, we have added the fix for the reported issue.


Please upgrade to the latest version packages to resolve this issue.     

https://www.nuget.org/packages/Syncfusion.Blazor.WordProcessor/


https://cdn.syncfusion.com/blazor/20.4.43/syncfusion-blazor-documenteditor.min.js(version)


Please let us know if you need any further assistance.


Regards, 

Kavitha M



AR ali reza January 14, 2023 03:11 PM UTC

the link that you send is access denied.

I updated the word processor to 20.4.43 in nuget.org

but the font family and the font size in programmatically does not change.

when I typed in word processor the problem no solved.

please send a way to resolve proble



KM Kavitha Muralitharan Syncfusion Team January 17, 2023 04:57 AM UTC

Ali, You can use the below link


Please upgrade to the latest version packages to resolve this issue.     

https://www.nuget.org/packages/Syncfusion.Blazor.WordProcessor/


https://cdn.syncfusion.com/blazor/20.4.43/syncfusion-blazor-documenteditor.min.js


Please let us know if you need any further assistance.





AH Ahmad January 22, 2023 07:28 AM UTC

This is still not fixed in the new build 20.4.44



DS Dhanush Sekar Syncfusion Team January 25, 2023 10:40 AM UTC

Hi Ahmed,


We have resolved the selection height issue. Also, we have tried to replicate the font family drop-down issue. We were unable to reproduce it from our end and have attached a video of the steps we took in the previous update. 

  • Could you please share the exact replication steps to reproduce the issue?
  • If possible, could you please share a video that illustrating the issue? it will be helpful to validate further and provide you the solution as soon as possible


Regards,

Dhanush Sekar


Loader.
Live Chat Icon For mobile
Up arrow icon