Reach Text box Warning: Some of your markup was stripped out. Please use the embed command

Pritesh dhameliya 1 Reputation point
2021-09-07T18:56:31.977+00:00

We have file download link in the rich text box but the "download" attribute is stripped out when html switches to text mode. we are using chrome Version 93.0.4577.63

<a href="http://xyz.com/policies/JOBAID.pdf" download="jobAid">home health job aid link</a>

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,803 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CaseyYang-MSFT 10,341 Reputation points
    2021-09-08T07:37:03.347+00:00

    Hi @Pritesh dhameliya ,

    Are you using this RichTextBox Class?

    You could try to use the following codes as a workaround.

    public void SaveFile()  
    {  
       // You should replace the bold file name in the  
       // sample below with a file name of your own choosing.  
       // Note the escape character used (@) when specifying the path.  
       richTextBox1.SaveFile(System.Environment.GetFolderPath  
       (System.Environment.SpecialFolder.Personal)  
       + @"\Testdoc.rtf",  
          RichTextBoxStreamType.RichNoOleObjs);  
    }  
    

    For Reference: Save Files with the Windows Forms RichTextBox Control


    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.