Cleaning up RTF text

后端 未结 4 1133
谎友^
谎友^ 2021-01-02 06:38

I\'d like to take some RTF input and clean it to remove all RTF formatting except \\ul \\b \\i to paste it into Word with minor format information.

The command used

4条回答
  •  感情败类
    2021-01-02 07:06

    I would use a hidden RichTextBox, set the Rtf member, then retrieve the Text member to sanitize the RTF in a well-supported way. Then I would use manually inject the desired formatting afterwards.

提交回复
热议问题