Show toolbar only when focused on RTE

Hi

is it possible to add feature to show toolbar only when RichTextEditor control has focus in Blazor. It is simillar solution to inline mode but not the same.
Then RTE will look like standard input until user clicks inside it.



Same as Thread ID: 150037

Regards
Vijay

6 Replies 1 reply marked as answer

IS Indrajith Srinivasan Syncfusion Team December 16, 2020 08:06 AM UTC

Hi Vijaymohan, 
 
Greetings from Syncfusion support, 
 
We have validated your reported query. Yes, you can achieve the same behavior in the Blazor Rich Text Editor. Bind the events Blur and Focus for the Rich Text Editor, dynamically enable and disable the Enable property from the RichTextEditorToolbarSettings. Check the below shared code blocks and sample for reference. 
 
Code blocks:  
 
 
@using Syncfusion.Blazor.RichTextEditor 
 
<SfRichTextEditor> 
    <RichTextEditorToolbarSettings Enable="@Enabled"></RichTextEditorToolbarSettings> 
    <RichTextEditorEvents Blur="@onBlur" Focus="@onFocus"></RichTextEditorEvents> 
    <p>Rich Text Editor allows to insert images from online source as well as local computer where you want to insert the image in your content.</p> 
    <p><b>Get started Quick Toolbar to click on the image</b></p> 
    <p>It is possible to add custom style on the selected image inside the Rich Text Editor through quick toolbar.</p> 
</SfRichTextEditor> 
 
@code { 
    public bool Enabled { get; set; } 
    public void onBlur() 
    { 
        this.Enabled = false; 
    } 
    public void onFocus() 
    { 
        this.Enabled = true; 
    } 
} 
 
 
 
Please let us know if the solution helps, 
 
Regards, 
Indrajith 



DE Devarajan December 17, 2020 06:47 AM UTC

Dear Indrajith Srinivasan,

when I use this line  <RichTextEditorToolbarSettings Enable="@Enabled"></RichTextEditorToolbarSettings>                           <RichTextEditorEvents Blur="@onBlur" Focus="@onFocus"></RichTextEditorEvents>  toolbar  dropdown menu like BackgroundColor, FontColor and font not working 


IS Indrajith Srinivasan Syncfusion Team December 18, 2020 01:32 PM UTC

Hi Devarajan, 
 
Good day to you, 
 
We have validated your reported query and have consider “Dynamically Enable/Disable, Rich Text Editor toolbars not working properly “ as an bug and the fix will be included with our patch release on 1st week of January. 
 
You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further enquiries through this link: https://www.syncfusion.com/feedback/20749/  
 
Regards, 
Indrajith 



RK Revanth Krishnan Syncfusion Team February 1, 2021 12:32 PM UTC

Hi Vijaymohan, 
 
 
Sorry for the inconvenience. 
 
We are currently facing complexity in implementing the fix “Dynamically Enable/Disable, Rich Text Editor toolbars not working properly“ we will include this fix in our patch release scheduled on 9th February. 
 
We appreciate your patience till then. 
 
Regards, 
Revanth 



RK Revanth Krishnan Syncfusion Team February 10, 2021 05:19 PM UTC

Hi Vijaymohan,  
  
  
Sorry for the inconvenience.  
  
We are still facing complexity in implementing the fix “Dynamically Enable/Disable, Rich Text Editor toolbars not working properly“ we will include this fix in our patch release scheduled on 16th February.  
  
We appreciate your patience till then.  
  
Regards,  
Revanth  



RK Revanth Krishnan Syncfusion Team February 17, 2021 02:41 PM UTC

Hi Vijaymohan, 
 
 
Thanks for the patience. 
 
  
We have resolved the reported issue ”Dynamically Enable/Disable, Rich Text Editor toolbars not working properly” with the package version 18.4.43.  
Can you please upgrade your package to this version to resolve the issue on your end?    
  
 
Regards, 
Revanth  


Marked as answer
Loader.
Up arrow icon