CopyQ icon indicating copy to clipboard operation
CopyQ copied to clipboard

BG color & Font color - black

Open PaPa31 opened this issue 5 years ago • 3 comments

Describe the bug If I copy selected text from OneNote online page (example of online page, but you won't be able to open it due to permission) i see black font on black background in copy history.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://www.onenote.com/notebooks'
  2. Make or open your account
  3. Create notebook
  4. Create page
  5. Type some text in the page
  6. Copy this text....

.. and now open copyQ history - you will see black font on the black background.

Expected behavior Fix bg & font colors at copy from OneNote online

Screenshots Screenshot from 2020-08-24 19-27-27

Version, OS and Environment (Get details from copyq version command if possible.)

  • Application Version: 3.10.0
  • OS: Ubuntu 20.04
  • Browsers: Chromium, Firefox

Additional context

PaPa31 avatar Aug 24 '20 14:08 PaPa31

I'm afraid that it's a bad or overly-complex HTML code. You can check the text/html format by selecting the item in CopyQ and pressing F4 shortcut (from menu bar: Item - Show Content...).

As workaround, change settings in CopyQ to store and display only plain text.

Another way (but bit more complicated) would be to fix the HTML code automatically after copying with a custom command in CopyQ.

hluk avatar Aug 27 '20 14:08 hluk

As workaround, change settings in CopyQ to store and display only plain text.

This helped. I also increased font size to 14 and max number of lines to 4.

madprops avatar Apr 27 '21 23:04 madprops

I see the same thing with links to items in Devops. The links are typically created by using the 'copy work item title' option that is available in various locations.

When I show content on the item (as mentioned above), there are both 'text/plain' and 'text/html' formats. The HTML one looks like the following (I replaced the URL, but it's otherwise untouched)

<html>
<body>
<!--StartFragment--><a href="https://dev-ops-url-goes-here" style="box-sizing: inherit; color: inherit; font-family: &quot;Segoe UI&quot;, -apple-system, BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, Helvetica, Ubuntu, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: inherit;">Pull Request 23031</a><span style="box-sizing: inherit; color: inherit; font-family: &quot;Segoe UI&quot;, -apple-system, BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, Helvetica, Ubuntu, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: inherit; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">: fix: Warning of existing enrolment not showing #71716</span><!--EndFragment-->
</body>
</html>

wyldphyre avatar May 10 '22 08:05 wyldphyre

Im having similar issues with leetcode. Let's say I'm coping my own solutions to a problem under submission tab, then the text is block of black in Firefox while in Chrome it's kinda Black with text being slightly visible.

RuthlessRuler avatar Oct 16 '22 19:10 RuthlessRuler

Use cmd and run it automatically for each paste. Refer the below as example.

Steps:

  1. Follow the steps to copy new command from - https://copyq.readthedocs.io/en/latest/command-examples.html#remove-background-and-text-colors
  2. I have modified the code to only remove bg-color
copyq:
var html = str(input())
html = html.replace(/background-color\s*:/g, 'xxx:')
setData('text/html', html)

  1. In the commands window (F6) -> Click Advanced and modify the code as shown above.
  2. Select Type : Automatic (runs on every clipboard)

p4r4g avatar Mar 29 '23 14:03 p4r4g