Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better plain text copy #8465

Closed
vmiklos opened this issue Mar 6, 2024 · 2 comments
Closed

Better plain text copy #8465

vmiklos opened this issue Mar 6, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@vmiklos
Copy link
Contributor

vmiklos commented Mar 6, 2024

Describe the Bug

Currently we give HTML to the browser when it comes to copy&paste, and then the browser converts that HTML to plain text. This is worse than our own plain text export, so we should use that instead.

Steps to Reproduce

  1. Create a new Writer document with a normal paragraph and 3 bullets.
  2. Select all.
  3. Copy
  4. Paste somewhere that wants a plain text format.

Expected Behavior

Something similar to Collabora Office:

Bullets:
    • a
    • b
    • c

Actual Behavior

HTML -> plain text conversion is done by browser, e.g. Firefox produces:

Bullets:

	a
	b
	c

Additional Context

A related problem is that when we determine if the current selection is simple or complex, then Writer marks inline images as complex (good), but anchored images are still simple (bad). That should be fixed first, given it allows easier testing that way.

This is a general problem, affecting both Firefox and Chrome.

@vmiklos vmiklos added bug Something isn't working unconfirmed labels Mar 6, 2024
@vmiklos vmiklos self-assigned this Mar 6, 2024
@vmiklos
Copy link
Contributor Author

vmiklos commented Mar 7, 2024

https://gerrit.libreoffice.org/c/core/+/164453 for the related problem around a simple selection that has an image.

@vmiklos
Copy link
Contributor Author

vmiklos commented Mar 20, 2024

#8569 fixes the complex case, this should be OK now.

@vmiklos vmiklos closed this as completed Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants