Bug: Paste from IntellJ(maybe more apps) inserts plain text html

version: 3.10.1
os: osx Sierra 10.12.5

Steps:

  1. copy text from intelJ (2017.2)
  2. paste into inkdrop

Result:
Text looks like:

<pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'Menlo';font-size:9.0pt;">#!/usr/bin/env bash </pre>

Expected:
#!/usr/bin/env bash

I don’t have this problem pasting from intellij into other apps (for example this chrome window I’m writing this message in).
Copying from chrome and pasting into inkdrop seems to work.

Hi Jeremy,

Thank you for the report!
It is a bug where HTML-to-Markdown feature fails to convert the clipboard data.
It seems like the text is actually HTML data when you copy it from IntelliJ.
For now, you can avoid it by pressing Cmd-Shift-Option-V or Menu -> Edit -> Paste as Plain Text.
I will fix it soon!

v3.10.4 should fix it. Thanks for reporting!

This is still happening to me.

When I copy from a web page, the html code is pasted on my note.
When I copy from phpstorm it removes all line breaks.

It is possible to make the “paste as plain text” as the default? Cause the editor doesn’t support any css/html, so the current behavior doesn’t help.

I’m using the latest version (3.13) on Mint Linux 18.

Thanks

Hi,

Thank you for reporting.

I couldn’t reproduce that phpstorm removes line breaks, tried on Ubuntu.
It’d be helpful if you could tell me the web page.
I need to reproduce it.

Changing the default behavior wouldn’t solve this problem.
It seems to be a bug and I’d like to fix it.

Thanks for the fast answer.
I made two gifs to show what is happening.

PhpStorm:

Gmail:


I’ve tried on other sites and the code was converted to markdown, I didn’t know about this feature. But with this email doesn’t work, sadly.

It is possible to change the shortcut to past without format to be the same as chrome? ctrl + shift + v on linux.

Thanks

Thanks for the gifs!

PhpStorm works fine on my Ubuntu. Could you try it again with all plugins disabled?
I’m not familiar with it but it worked when it’s vanilla.

Seems like <u> tags are not converted properly. Thanks!

It is possible to change the shortcut to past without format to be the same as chrome?

Yes, you can customize keybindings from preferences like so:

Hope this helps.

Sorry for the delay.
I’ve tried with a new installation of inkdrop and PhpStorm, with only the default plugins, on a fresh install of Elementary OS and I have the same behavior. On Mint too.

Thanks

Hi, thanks for the report.
I would try a different approach for this issue.

I tested with Paste as Plaintext and worked. I only used this when copy and pasting from PHPStorm. Why? Not sure, habit I guess.

I tried Paste option and I got the same result as @Luis_Henrique_Faria GIF of copy and paste from PHPStorm.

Seems like it’s a regression. I’ll work on it. Thanks.

@Luis_Henrique_Faria v3.16.0 should fix the problem. Could you try it?

mixed results:

Still removing some \n
But is better!

I don’t see the problem on my mac.
So it seems to be a platform dependent problem.
I’ll check it, thanks.

Hi Luis,

I decided to drop the feature that automatically converts HTML into Markdown by default.
This feature is now provided as a plugin: paste-as-markdown

Thanks for the report!

Nice! I think that will work for me.

I’m trying to download the latest version (.deb package), but…

image

Thanks :slight_smile:

Oops, sorry. The link was invalid.
Could you try again?

It’s working now. Thanks!

1 Like

Cool!