prateekmedia / budgie-clipboard-applet

A clipboard manager applet that can help you to store and manage clipboard content. Made with ♥️ for budgie desktop.
GNU General Public License v3.0
17 stars 5 forks source link

Suggestion: Retain text formatting when pasting #16

Open fossfreedom opened 3 years ago

fossfreedom commented 3 years ago

Testing v0.9

image

When pasting formatted text (e.g. libreoffice writer) - when pasting it converts to plain ascii.

This in itself is a very useful option - but really the formatting of the copied text should be retained and applied when pasting by default.

prateekmedia commented 3 years ago

Hmm, ok the thing is that their is not sufficient resource about richtext in vala.

Also the text That I'm saving is in "string" form not in Rich text so for now I can't make it happen.

fossfreedom commented 3 years ago

This this is the correct function to get the clipboard contents as rich text https://valadoc.org/gtk+-3.0/Gtk.Clipboard.request_rich_text.html

EDIT: or can use this as well https://valadoc.org/gtk+-3.0/Gtk.Clipboard.wait_for_rich_text.html

prateekmedia commented 3 years ago

@fossfreedom Easier to be said than to be done,

wait for text didn't require any extra, but this requires two parameters, both of which I dont know what to put their

Jacob-Vlijm commented 3 years ago

To be honest, not quite fond of the idea of keeping text formatting. If plain text is pasted into e.g. LibreOffice, it will format according to the document, which is usually what we want. Actually spending a lot of time stripping text from the formatting "polution". If I was to decide, paste as plain text by default.