[Support] Copy PlainText

It would be nice if these options were optional:

  • Copy to the clipboard automatically after selection.
  • Insert with the middle mouse button.
  • Links also as plain text.

1- The copy action is NOT straight forward in WebExtension and involves injecting scripts into content which is a hack. To run it every time a selection is made creates a great deal of resource usage. Additional, I have seen that type of feature in action and personally I found it annoying. I copy a link and then mouse moves and it replaces my copy with the new selection which can be just a space, so I have to select the link again and make sure the mouse doesn’t select anything before I paste it somewhere. I found it to be very impractical.
2- WebExtension support of button is very limited. Once that is improved, I will look into it.
3- That is possible but requires extra processing and some text may include many unobvious links. If there is a popular demand for it, I will add the feature.

Thank you very much for your quick and interesting answers.
CopyPlaneText is very helpful to collect many different texts for inserting in an office-text or emails.
My first wish is not very important for there are add-ons like CopyOnSelect.
Paragraph two is very important to me. I miss the add-on AutoCopy so much in firefox-57 because I have to insert hundreds of small texts in my browser every day.
With AutoCopy, this was always done by clicking the middle mouse button.

Let’s see when the support is added.

At the moment, WebExtension API does not accept middle key as a command.

Context menu should stand for formatted copy.

As mentioned, it is not possible at the moment to replace the default Firefox copy in a WebExtension.

Copy PlainText needs a setting to replace ‘\t’ with a fixed number of spaces (e.g. 4, 8, etc…). The problem being, much of the code that gets copied is copied with tabs (that’s just pure damn evil). A simple substitution from tabs to spaces (or option to do that) would make Copy Plain Text much more useful in those circumstances. Yes, you can always substitute in the target editor, but a simple substitute would be a simple useful addition.

Copy PlainText does replace \t (one or more) with a single space at the moment.

If that is not happening, please give me an example where I can test it.

However, adding more control i.e. replacing \twith x number of spaces is possible.

Sure, happy to. Copy the code at http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/init.html#INITEX (I pasted it into kwrite (KDE3)). It pasted with '\t' all though the code to provide the indention and I had to do a global regex search and replace all the \t with 4-spaces. Not a huge deal, but if Copy Plain Text is supposed to substitute – it ain’t :slight_smile:

Wait! My bad, Copy Plain Text places the result in the copy-buffer, not the select-buffer. The text in the copy-buffer does have tabs substituted, but that is the least of the problems, the code loses all the line-endings as well and is completely unreadable. Yikes. Take a look, see what your results are, there is something fishy about how that is being handled.

The formatting of placing an <span> inside a <pre> that is used there is rather odd.

Nonetheless, removing formatting from inside a pre or textarea (or other input) works differently than copying text form normal HTML nodes.

Add-on gets the data that is passed to it by the WebExtenion API and that is how it is passed to it. I will have to look into it a bit more.

I filed a bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1427298

Thank you. Keep up the great work with Copy PlainText.

Custom Keyboard Shortcuts are coming soon in v1.8 (FF60+).
The code is done and I am testing at the moment.

Let me know if there are other feature requests.

@erosman It might be out of of scope for this plugin.

However it would be really awesome to add a paste as plain text option.

This would be very useful for pasting formatted text that comes from outside Firefox, into firefox.

Chrome already has this functionality and it would be great to have similar functionality in Firefox.

2018-07-26%2014_46_38-Window

OK… I will work on it for the next update.

As you might have discovered, that same keyboard shortcut (Ctrl+Shift+v) works in Firefox in rich editing controls, so at least you have that for now.

That’s awesome, thanks!

Yeah, I am aware of Ctrl+Shift+v, unfortunately I have got very used to the convenience of the menu option in chrome.

Hello can you make a button in the “Title bar” to copy the selected Text as PlainText?

Hi

I’m trying to use Copy Plain Text from here:

http://www.videos2013a.com.br/BLACKLIST%20Elcio/Blacklist%20de%20e-mails%20Somente%20do%20Elcio%20até%2012-10-2017.txt

It is 288,078 lines.

Sadly Copy Plain Text copy only 665 lines… )-:

It’s just an example…

Thanks

The add-on author is currently unable to login to this forum.
Please use the new support site: