SfRichTextEditor - insert video

Hi there,

please provide an example how to add a custom video using code-view in the editor.

I've tried to insert pure HTML like <iframe src="https://www.youtube.com/embed/zCkqbDdvZTM">iframe> under a typed in text-section, but this gets always deleted by the editor.



Any ideas?

Cheers,
Volker

5 Replies 1 reply marked as answer

RK Revanth Krishnan Syncfusion Team April 1, 2021 11:05 AM UTC

Hi Volker, 
 
 
Greetings from Syncfusion support. 
 
 
We have validated your query “Please provide an example of how to add a custom video using code-view in the editor. The added Iframe content always gets deleted”. 
 
This can be achieved by setting the “EnableHtmlSanitizer” property as false. We have prepared a sample for your reference, 
 
Code Snippet: 
 
@using Syncfusion.Blazor.RichTextEditor 
 
<SfRichTextEditor EnableHtmlSanitizer="false"> 
</SfRichTextEditor> 
 
 
Please check the above code snippet and the sample and let us know if it satisfies your requirement. 
 
Regards, 
Revanth 



VO Volker April 3, 2021 06:32 AM UTC

Hi Revanth,

is it possible to keep the safety (EnableHtmlSanitizer=true) but allow the iframe-tag?

cheers,
Volker


RK Revanth Krishnan Syncfusion Team April 5, 2021 12:53 PM UTC

Hi Volker,  
  
  
Good day to you.  
  
  
We have validated your query and have considered “Provide support to customize the tags in 'EnableHtmlSanitizer' using the 'BeforeSanitizeHtml' event” as a bug from our end and logged the report for the same and the fix will be included with our patch release on 13th April.        
           
You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further inquiries through this link: https://www.syncfusion.com/feedback/23971 
 
Once the issue is fixed, the iframe tag can be allowed even when the 'EnableHtmlSanitizer' is set true. 
      
Regards,      
Revanth 



RK Revanth Krishnan Syncfusion Team April 14, 2021 12:16 PM UTC

Hi Volker, 
 
Sorry for the inconvenience. 
 
As we are facing complexity in fixing the issue. We will include the fix in the coming patch release on 27th April. 
 
We appreciate your patience till then. 
 
Regards, 
Revanth 



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

Hi Volker, 
 
 
Thanks for the patience. 
 
 
We have included the issue fix for “Provide support to customize the tags in 'EnableHtmlSanitizer' using with new property” with the package version 19.1.59.    
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