BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
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
Ali, we will check and update details shortly.
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.
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;
}
}
}
the cursor is so long hight
Ali, We can reproduce the reported issue with provided document. Currently, we are validating and get back to you shortly
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.”
when i click on your link shows access denied
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.
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.
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.
Hi Ali,
we are glad to announce that our patch release (v20.4.43) is 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
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
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.
This is still not fixed in the new build 20.4.44
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.
Regards,
Dhanush Sekar