on text select get fontfamily of the text in document editor

Hi


I would like to get the font family of the selected text or cursor near to the text. 


how could I get that value?

I have also attached the video.


I am using custom toolbar for the editor.

<e-item type="Input" tooltipText="Schriftart ändern">
<ng-template #template>
<ejs-combobox [dataSource]='fontStyle' [width]='120' [index]='2' [allowCustom]=true
(change)='onFontFamilyChange($event)' [showClearButton]=false></ejs-combobox>
</ng-template>
</e-item>

please provide me appropriate solution to change value of selected font family.


Regards,

Parth


Attachment: Fontfamily_get_d7499f7a.7z

13 Replies

SM Suriya Murugan Syncfusion Team December 8, 2021 03:45 AM UTC

Hi Parth, 

Syncfusion Greetings! 

You can use fontFamily property in selection character format to return current selection format. 

Code snippet: 
this.container.documentEditor.selection.characterFormat.fontFamily 
 



Please let us know if you have any questions. 

Regards, 
Suriya M. 



PK Parthkumar Kakadiya December 8, 2021 08:20 AM UTC

Hi Suriya,


Thanks  a lot for your solution. it's working now.


Regards,

Parth



SM Suriya Murugan Syncfusion Team December 8, 2021 09:24 AM UTC

Hi Parth, 

Thanks for your update. 

Regards, 
Suriya M. 



PK Parthkumar Kakadiya December 8, 2021 12:34 PM UTC

Hi Suriya,



When I tried to apply bullet and numbering to the heading it throws an error in console. 


I have attached the video with error message. 

this.documentEditor.editor.applyBullet('\uf0b7', 'Symbol');

This is how I apply bulltes.


Regards,

Parth


Attachment: provide_bullets_to_heading_29063a4.7z


KB Kurthis Banu Abdul Majeeth Syncfusion Team December 9, 2021 07:46 AM UTC

Hi Parth, 

We have tried to reproduce your reported issue with below sample in Latest version. We couldn't reproduce exact issue have you faced. 


  public onToolbarClick(args: ClickEventArgs): void { 
    switch (args.item.id) { 
        case 'Custom': 
            this.container.documentEditor.editor.applyBullet('\uf0b7', 'Symbol'); 
            break; 
    } 
}; 
 
 


So, could you please modify above sample with your reported case. This will be more helpful to reproduce the same issue at our end. Thereby, we will analyze further and provide you the appropriate solution at the earliest. 

Regards, 
Kurthis Banu A. 



PK Parthkumar Kakadiya December 13, 2021 03:54 PM UTC

Hi Kurthis, 


I have changed the stakblitz example and now I can reproduce error again. I have also attached the video overview of the error.


What I am trying to achive: 

  1. add new Paragraph format type in the list of format 
  2. want to give bullets and numberinbg to the new format type 


https://stackblitz.com/edit/angular-9g6agb-mmrqxf?file=app.component.html


Please take a look my problem and provide me solution.


Attachment: Heading_Bullets_e4565b55.7z


SM Suriya Murugan Syncfusion Team December 14, 2021 11:36 AM UTC

Hi Parth, 

We can reproduce the reported issue. Currently, we are validating the created style and get back to you by December 16,2021. 

Regards, 
Suriya M. 



SM Suriya Murugan Syncfusion Team December 16, 2021 12:24 PM UTC

Hi Parth, 
  
We need some additional timeline to validate the reported issue. We will updatee further details on or before December 20,2021. 
  
Regards, 
Suriya M. 



SM Suriya Murugan Syncfusion Team December 20, 2021 03:49 AM UTC

Hi Parth, 

We have confirmed the reported scenario as bug and logged the defect report. We will fix this issue and include in our EJ2 patch release which is scheduled on  

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


Regards, 
Suriya M. 



SM Suriya Murugan Syncfusion Team December 20, 2021 03:53 AM UTC

Hi Parth, 

Please ignore previous update. 

We have confirmed the reported scenario as bug and logged the defect report. We will fix this issue and include in our EJ2 patch release which is scheduled on January 12,2021. 

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


Regards, 
Suriya M. 



SM Suriya Murugan Syncfusion Team January 13, 2022 03:50 AM UTC

Hi Parth, 


Apologies!


We are unable to include the fix in our latest release because of technical issue. We will fix this issue and include in our EJ2 patch release which is scheduled on January 19,2021. 


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


https://www.syncfusion.com/feedback/31311/facing-script-error-when-apply-list-to-newly-created-character-style  


Regards, 

Suriya M. 




SM Suriya Murugan Syncfusion Team January 19, 2022 02:09 PM UTC

Hi Parth,  

 
In our latest release, we have included fix to resolve the reported issue but we still having issue in applying list similar to MS Word. We will fix this issue and include in our EJ2 patch release which is scheduled on February 9,2022.  

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

 

 
Regards,  
Suriya M.  




SM Suriya Murugan Syncfusion Team February 9, 2022 11:42 AM UTC

Hi Parth, 


We are glad to announce that our patch release (v19.4.50) is rolled out successfully and In this release, we have added the fix for the reported issue.  


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


Please let us know if you need any further assistance. 


 
Regards, 
Suriya M. 


Loader.
Up arrow icon