Jump to content

Evernote Web doesn't preserve indents on paste from elsewhere to evernote

Recommended Posts

Dear Evernote team,

I've noticed that pasting text to evernote transforms original indentation.

This is the original text with indents



This is the same text pasted to evernote



It looks like Evernote transforms original indentation and reduces number spaces down to 2.

I'm using Ubuntu 16.04LTS with Chromium (Version 55.0.2883.87 Built on Ubuntu , running on Ubuntu 16.04 (64-bit)).

Please, have a look at this issue.


Yours faithfully,

Constantine Bonebryukh

Link to comment
  • Level 5*

Depending on how the paste goes from the clipboard into Evernote web, indentation may not be preserved because in HTML (more or less Evernote's internal format), tabs and spaces aren't particularly meaningful. If there were some internal translation on paste, then it could recognize the indentation and apply the appropriate HTML markup, but if it goes straight in, indentation would indeed be lost. I'm guessing that it's the latter case.

Link to comment
  • Level 5*

OK, so I took a text file that uses tab characters (in C or C++, '\t') for indentation. Selected and copied a section, and pasted it into a new note in the Evernote Web client. Synced this, and in the Evernote Windows client, exported it to an Evernote format file (.ENEX). I noted that each line is enclosed by a <div>...</div> HTML markup pair (occasionally there would be a <br /> break  markup tag, to denote a blank line). Also I noted that tab characters were preserved.

However, as noted before, tab characters have no meaning in HTML except as whitespace; indentation would be accomplished using some other method (appears to be <div style="margin-left:80px;"></div> markup, at least that's how the Windows program does it).

Link to comment
  • Level 5*
30 minutes ago, comeanother said:

I'm using whitespaces.

Whitespace characters include actual space characters (' '), tab characters, carriage returns and line feeds.

31 minutes ago, comeanother said:

It seems that some JS script reformats pasted text.

Yes, it needs to do so that lines are preserved. In HTML, line feeds or carriage returns don't count as end-of-line markers; you need to add markup to denote lines. That's what the <div>...</div> stuff is doing. Here's some excruciating detail on that: https://www.w3.org/TR/html4/struct/text.html. It may be that the conversion adds extra space characters into the <div></div>, but I haven't looked all that deeply into it.To do actual indentation, you need more markup, which evidently doesn't occur.

Link to comment
  • 1 month later...

I have also run into this issue. I use the Evernote web app in Chromium as there is no Evernote client for Linux. This issue makes Evernote essentially useless for saving code snippets where indentation is very important either for code readability or correct execution. I am now looking for an Evernote alternative to use on Linux as I need a quick and efficient way to save code snippets and make notes on them at work.

  • Like 1
Link to comment
  • 2 weeks later...
  • 7 months later...
  • 4 weeks later...
  • 2 weeks later...
  • 2 weeks later...
  • 2 weeks later...

Any plans on fixing this? As a developer, I would like to be able to save code snippets in Evernote. Formatting button [{}] called CODE suggest I should be able to do this. However, pasting plain text from my emacs drops all indentation (spaces). Interestingly, in this discussion forum, CODE button inserts code fragment with correct indentation:


                 family_member := λ (j : nat) (jc : j < 2),
                                    (SHPointwise Monoid_RthetaFlags (IgnoreIndex abs)
                                     ⊚ SafeCast
                                         (SHBinOp (SwapIndex2 j (IgnoreIndex2 sub)))
                                     ⊚ Gather Monoid_RthetaFlags (h_index_map j 2)) |}

Could Evernote web app do the same?

Link to comment
  • 1 year later...
  • 7 months later...
  • 8 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...