RhetTbull / textinator

Simple MacOS StatusBar / Menu Bar app to automatically detect text in screenshots
MIT License
179 stars 8 forks source link

Copying text from a cell within a Microsoft Excel Worksheet triggers Textinator #16

Closed bwagner closed 2 years ago

bwagner commented 2 years ago

Copying text from a cell within a Microsoft Excel Worksheet triggers Textinator, even though that is already text.

RhetTbull commented 2 years ago

I've reproduced this but also verified that Textinator is working "as designed" currently. Excel copies both a text representation of the cell as well as an image representation of the cell.

Screen Shot 2022-10-25 at 6 35 03 AM

And here's the image of the cell from the clipboard:

excel

You can disable this by unchecking "Detect text in images on clipboard" and Textinator will ignore the copied cell from Excel.

I'm sure that other apps do this to as macOS allows apps to place multiple representations on the clipboard. One possible solution is to have Textinator check to see if there is also a text representation on the clipboard and skip it so as not to detect any text. However, it's possible to copy both text and image to the clipboard intentionally, for example, highlight then copy a selection of text and an embedded image in a document. What should Textinator do in this instance?

I think the most correct behavior is probably to refuse to do text detection if the clipboard contains any text in addition to an image.

RhetTbull commented 2 years ago

Fixed in v0.9.1

v0.9.1 will look to see if there is also text on the clipboard when an image is copied, and if so, will not run text detection.

RhetTbull commented 2 years ago

Still need to add a test case for this condition.