bonafideduck / react-highlight-within-textarea

React component for highlighting bits of text within a textarea
93 stars 13 forks source link

Pasting formatted code preserves the format. #181

Open bonafideduck opened 1 year ago

bonafideduck commented 1 year ago

Pasting already formatted HTML will preserve the html's formatting. For example, open the demo page, copy the function in the sample code and paste it in. The bold is preserved. All formatting should be stripped before adding it. This is a textarea.

bonafideduck commented 1 year ago

The solution is to set the stripPastedStyles on the Editor component.