telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.33k stars 5.23k forks source link

Copy-n-paste to/from the clipboard saving formatting #5795

Open ruv opened 5 years ago

ruv commented 5 years ago
### Steps to reproduce 1. Copy a text message with formatting (bold, italic, monospace, links) into the clipboard. 2. Paste into a rich text editor from the clipboard. ### Expected behaviour The text with formatting should be inserted. ### Actual behaviour The plain text is inserted. **Operating system:** Windows **Version of Telegram Desktop:** 1.5.15
ov7a commented 4 years ago

This can also be reproduced on Linux with version 2.0.1. When a message is copied to clipboard it has these targets (according to xclip)

text/plain
UTF8_STRING
STRING
TEXT
application/x-td-field-text
application/x-td-field-tags

Compare this to targets from a browser (Firefox):

text/html                                     # <- note this one
text/_moz_htmlcontext
text/_moz_htmlinfo
UTF8_STRING
COMPOUND_TEXT                  # <- note or that one
TEXT
STRING
text/plain;charset=utf-8
text/plain
text/x-moz-url-priv

or from a text editor (Libre Office Writer)

application/x-openoffice-embed-source-xml;windows_formatname="Star Embed Source (XML)"
text/rtf
text/richtext                        # <- note this one
text/html                            # <- note this one
text/plain;charset=utf-16
application/x-openoffice-objectdescriptor-xml;windows_formatname="Star Object Descriptor (XML)";classname="8BC6B165-B1B2-4EDD-aa47-dae2ee689dd6";typename="LibreOffice 6.0 Text Document";viewaspect="1";width="16999";height="2995";posx="0";posy="0"
text/plain;charset=utf-8
UTF8_STRING
STRING
application/x-libreoffice-internal-id-5387

P.S. This bug combined with that one makes editing content for channels quite annoying.

stale[bot] commented 4 years ago

Hey there!

This issue will be automatically closed in 7 days if there would be no activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

ov7a commented 4 years ago

This is still an issue and I hate this bot.

Aokromes commented 4 years ago

xd if you hate it think me with 100s of notifications lol

stale[bot] commented 3 years ago

Hey there!

This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

ov7a commented 3 years ago

This is still an issue and I hate this bot.

sauron918 commented 3 years ago

It's still a problem to copy/paste some text with formatting from browser. [Telegram 3.0.1, macOS 11.6]

Aokromes commented 3 years ago

It's still a problem to copy/paste some text with formatting from browser. [Telegram 3.0.1, macOS 11.6]

test on 3.1.9.

sauron918 commented 3 years ago

test on 3.1.9.

Still getting plain text

Screen Recording 2021-10-24 at 18 12 43

PeterDaveHello commented 1 year ago

Still the same on v4.9.1

john-preston commented 1 year ago

Migrating the internal Telegram formatting to / from HTML / RichText isn't supported at the moment and isn't supposed to work. This may be requested as a feature / enhancement, but currently I have no plans on working with that.