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

Paste as markdown #6842

Closed
micw opened this issue Jan 9, 2025 · 4 comments
Closed

Paste as markdown #6842

micw opened this issue Jan 9, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@micw
Copy link

micw commented Jan 9, 2025

Is your feature request related to a problem? Please describe.

I often need to paste markdown from an existing document (outside of nextcloud) into nextcloud text. Since it's not possible to toggle between text and markdown (#3570), it's hard to do so. A workaround is to rename the file to *.txt, paste the markdown and rename it back to *.md. But this breaks collaborative editing.

Describe the solution you'd like
An option to "paste as markdown" that threads the input as markdown, formats it to rich text and pastes it.

Describe alternatives you've considered

@micw micw added the enhancement New feature or request label Jan 9, 2025
@juliusknorr
Copy link
Member

You should be able to just paste plain markdown and text insert it as rich text. I just tested this with a simple example.

Maybe I'm missing something from your description?

## Test

* test **test**

| foo | bar |
|---|---|
| foo | bar |

Results in

Image

@micw
Copy link
Author

micw commented Jan 9, 2025

True, this "just works" when I select "Paste without formatting" in Firefox. I did not notice this and always pasted with the normal paste which gave me a code block containing the markdown.

Closing this issue.

Edit: what do you mean with "insert it as rich"?

@micw micw closed this as completed Jan 9, 2025
@juliusknorr
Copy link
Member

Edit: what do you mean with "insert it as rich"?

Inserting the formatted text as you see it in the screenshot, not the plain text with visible markdown formatting symbols like #

True, this "just works" when I select "Paste without formatting" in Firefox. I did not notice this and always pasted with the normal paste which gave me a code block containing the markdown.

Good to hear that. It depends on what the source you copy from is adding to the clipboard. If there is both plaintext markdown as well as HTML with formatting in the clipboard we will prefer HTML, that is why it might be that you get a code block. What is the app you are copying from?

@micw
Copy link
Author

micw commented Jan 9, 2025

Different sources, e.g. CodiMD, VS Code, Github, Shell

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

No branches or pull requests

2 participants