Add more font in blazor editor document component

Hello Syncfusion Teams,

I am working on blazor server project and i need to create and edit docx files.
I chose DocumentEditor component but i would need to add more fonts in font dropdown menu, is it possible?
thanks
Giulia


5 Replies 1 reply marked as answer

HC Harini Chellappa Syncfusion Team September 18, 2020 01:22 PM UTC

Hi Giulia, 

Syncfusion Greetings! 

Document editor provides option to set font families for the font dropdown. 



Sample code snippet 

<SfDocumentEditorContainer EnableToolbar="true" DocumentEditorSettings="EditorSettings" @ref="EditorContainer" RestrictEditing="true" ToolbarItems="items" Width="98%" Height="98%" LayoutType="LayoutType.Pages" ID="docedit"> 
        <DocumentEditorContainerEvents Created="onOpen"></DocumentEditorContainerEvents> 
    </SfDocumentEditorContainer> 

@code{ 
            DocumentEditorSettingsModel EditorSettings = new DocumentEditorSettingsModel() { FontFamilies= new string[5] { "Algerian", "Arial", "Calibri", "Cambria", "Windings" } };             

Kindly check the above and let us know whether this helps. 

Regards, 

Harini C 


Marked as answer

HA hach October 18, 2022 04:24 AM UTC

Hi Harini Chellappa


I would need to add more fonts in font dropdown menu  too.  As your guide, i add it as this text.


            <SfDocumentEditorContainer @ref="container" Height="580px" Width="1300px" EnableToolbar="true" EnableRtl=true DocumentEditorSettings="EditorSettings" >

                <DocumentEditorContainerEvents Created="OnCreated" DocumentChanged="OnDocumentChange" ></DocumentEditorContainerEvents>

            </SfDocumentEditorContainer>

@code {

    internal string DocumentName { get; set; }

    SfDocumentEditorContainer container;

    DocumentEditorSettingsModel EditorSettings = new DocumentEditorSettingsModel() { FontFamilies= new string[3] { "Algerian", "Arial","Tahoma" } };

}

but  there is not any change in font dropdown .

please guide me. thanks.






SM Suriya Murugan Syncfusion Team October 21, 2022 03:48 AM UTC

Hi Hach,


We can reproduce the reported issue. Currently, we are validating and get back to you by October 21, 2022.


Regards,

Suriya M.



DS Dhanush Sekar Syncfusion Team October 21, 2022 11:56 AM UTC

Hi Hach,


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 November 16, 2022.

 

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

https://www.syncfusion.com/feedback/38618/font-family-customization-is-not-working-in-properties-pane

 

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.”


Regards,

Dhanush Sekar.





DS Dhanush Sekar Syncfusion Team November 16, 2022 11:30 AM UTC

We are glad to announce that our patch release (v20.3.57) has been 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/

 

CDN link : https://cdn.syncfusion.com/blazor/20.3.57/syncfusion-blazor-documenteditor.min.js


Loader.
Up arrow icon