Skip to content

Commit

Permalink
allow 'xpra/html' as a 'text' target
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 20, 2024
1 parent 0da4d81 commit eaf2e54
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xpra/clipboard/clipboard_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ def get_discard_targets(envname:str="DISCARD", default_value:Tuple[str,...]=()):
log("DISCARD_EXTRA_TARGETS=%s", csv(DISCARD_EXTRA_TARGETS))


TEXT_TARGETS : Tuple[str, ...] = ("UTF8_STRING", "TEXT", "STRING", "text/plain")
TEXT_TARGETS: Tuple[str, ...] = tuple(
os.environ.get("XPRA_CLIPBOARD_TEXT_TARGETS",
"UTF8_STRING,TEXT,STRING,text/plain,text/html").split(",")
)


TRANSLATED_TARGETS : Dict[str, str] = {
"application/x-moz-nativehtml" : "UTF8_STRING"
Expand Down

7 comments on commit eaf2e54

@mykeebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @totaam,

Based on one of our earlier e-mail conversation, you mentioned that this feature will be optional/switchable. Could you please let me know how it is possible now? We use Xpra v12, but could not really find the way to switch this feature on, By default, it does not work and copies only plain text without formatting.

Thanks in advance,
Mike

@totaam
Copy link
Collaborator Author

@totaam totaam commented on eaf2e54 Apr 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mykeebot this has not been implemented yet.
This commit is for the xpra server. The changes to the xpra-html5 client are recorded in: Xpra-org/xpra-html5#273 , ie: Xpra-org/xpra-html5@75652df
Maybe you are hitting Xpra-org/xpra-html5#298

@mykeebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @totaam,

Many thanks for your quick answer. Yes, I was referring to the ticket what I have created before: Xpra-org/xpra-html5#273

So it has not been implemented yet in the stable repo? I tested it before from one of the beta repo and it worked OK. Could you please let me know what's the plan with this? Will it be implemented in the near future?

Thanks again,
Mike

@totaam
Copy link
Collaborator Author

@totaam totaam commented on eaf2e54 Apr 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xpra-org/xpra-html5#273 is closed and completed, the bug in Xpra-org/xpra-html5#298 will need a new release.
The ability to choose between text/plain and text/html still needs to be implemented, then there's also the problem of Firefox completely breaking the clipboard: Xpra-org/xpra-html5#301

Since I am working on xpra v6, I am unlikely to solve all of these issues soon.

@mykeebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @totaam,

Understood. Thanks for your input again.

Mike

@mykeebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@totaam, please also take into account that for us the priority of this has been dropped, as we have implemented a solution for this problem within our application.

Thanks,
Mike

@ephestione
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I see the issue I raised was referenced, I'd like to report here as well that even with the latest html5 module, I still cannot paste into the remote application Xpra-org/xpra-html5#298 (comment)

Please sign in to comment.