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

line breaks are removed when past external content #1614

Closed
3 tasks done
aisbergde opened this issue Feb 20, 2022 · 5 comments
Closed
3 tasks done

line breaks are removed when past external content #1614

aisbergde opened this issue Feb 20, 2022 · 5 comments
Assignees
Milestone

Comments

@aisbergde
Copy link
Contributor

⚠️ This issue respects the following points: ⚠️

  • This is a bug. Not a question or feature request.
  • The issue is not already reported at Issues or discussions. (I've searched it).
  • Markor is up to date. See Releases for the latest version. Updates are available from F-Droid and GitHub.

Description

normally I can copy external content and past into Markor and line breaks are keeped. But there are some web pages, which I can't use as source to copy content into Markor. But I can use other editors to past the content including line breaks.

Steps to reproduce

  1. open https://plantuml.com/activity-diagram-beta
  2. copy any code example, for example the first one
  3. past into Markor
  4. line breaks are removed
  5. use another editor, some of them will keep line breaks
  • code editor
  • acode
  1. some other editors will also lost line breaks,
    for example this editor here for GitHub issues will not keep line breaks, but it will add some additional code around the inserted content
  | @startuml :Hello world; :This is defined on several **lines**; @enduml
-- | --

Information

Android version: 11
Device: Poco X3 Pro
App Version: 2.8.6 (130)

Source

F-Droid

Format / File type

Plaintext

Additional info / Log

-
@harshad1
Copy link
Collaborator

FWIW, this works fine for me the text inserts with the correct line breaks... Could you try a different browser, maybe?

Both the copy button and opening the editor and select all -> copy worked

I did have to use desktop mode on my phone's browser (bromite) though.

@gsantner
Copy link
Owner

gsantner commented Jun 5, 2022

I can reproduce it (currently), could not previously.
Could also notice it at K9-Mail when writing the same text in email body for example.
Seems like something quite special.

It also doesn't have todo with syntax highlighting or autoformat, tried it with both disabled.
Assume this is something Android EditText component related.

@gsantner gsantner self-assigned this Jun 5, 2022
@gsantner gsantner added this to the Markor v2.10 milestone Jun 5, 2022
@gsantner
Copy link
Owner

gsantner commented Jun 5, 2022

@aisbergde

have you not noticed the "Paste as plain text" option, or do you not have it? It does exactly that. The code copied from the mentioned website is copied as richtext, and this is making up for the newlines getting lost.

screenshot-2022-06-05__15-51-43

What I changed is, remapping the Paste just to "Paste as Plaintext".

@aisbergde
Copy link
Contributor Author

I don't have this option, which, you have in your Screenshot. Maybe because I use MIUI which has some strange missing features regarding copy and paste.
Screenshot_2022-06-05-18-14-28-278_net gsantner markor

But I use swift keyboard, and it has a way to insert the content of the clipboard. As a work around this works.

@gsantner
Copy link
Owner

gsantner commented Jun 5, 2022

anyway, with my change any paste will use the plaintext one. this functionality is available from Android Marshmallow onwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants