When I paste text to a NSTextView, I wish I can paste plain text only. All the rich text formats should be removed, include: font, color, link, and paragraph style. All the text pasted should be displayed with the default font and style of the text view. NSTextView accepts rich text by default, how to disable it?
Use Ctrl + Alt + V (or Cmd + Alt + V on a Mac) to open the Paste Special window. Here, select Unformatted Text to paste in plain text. Finally, if you'd like, you can set the default paste option in Word to always paste in plain text.
Sometimes you just want to paste as plain text. Microsoft Edge, Google Chrome, and Mozilla Firefox all support Ctrl + Shift + V as a keyboard shortcut for “paste as plain text.” This means that Ctrl + Shift + V also works in browser-based apps, like Teams.
Copy and paste-without-formatting on a PC: Ctrl-C, Ctrl-Shift-V. Normal copy and paste on a Mac: Cmd-C, Cmd-V. Copy and paste-without-formatting on a Mac: Cmd-C, Cmd-Opt-Shift-V.
Luckily, there's a simple shortcut you can use in Microsoft Excel to paste text without formatting. To use this shortcut, simply select the cell where you want to paste the text. Then, press Ctrl + Shift + V on your keyboard. This will paste the text without any formatting.
Use isRichText = false
to disable rich text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With