Jump to content
comeanother

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

evernote_indent1.jpg

 

This is the same text pasted to evernote

evernote_indent2.jpg

 

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

Share this post


Link to post

What is the original application (where you pasted from)? Is it a text editor?

Share this post


Link to post

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.

Share this post


Link to post

I do not have any issues with google services, atlassian or github. But I need to note some .yml formatted text (indentations are mandatory). If Evernote Web brokes indentations it can be usefull for me no more.

Share this post


Link to post

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).

Share this post


Link to post

I'm using whitespaces.

It seems that some JS script reformats pasted text.

As you can see on screenshot, the number of spaces is preserved in page sources, but the page shows wrong number of spaces.

evernote3.png

Share this post


Link to post
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.

Share this post


Link to post

I suppose, that Evernote Web should take care of markup stuff (as it has even WYSIWIG editor).

I doubt that this option is too complex to implement or fix.

I'm wondering am I first person who noted this inconvenience?

Share this post


Link to post

Dear @jefito and Evernote team,

 

Here is a wishing that the coming year is a glorious one that rewards all your future endeavors with success.

Happy New Year!

 

Yours faithfully,

Constantine Bonebryukh

 

Share this post


Link to post

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

Share this post


Link to post

+1 to fixing this. Has tripped me up numerous times.

 

Workaround: paste the text first into a Gmail message (preserves formatting), select the text in Gmail, copy, then paste in Evernote.

Share this post


Link to post

+1 to fix this too.

Thanks for the workaround Jan Z!

Share this post


Link to post

This makes for a terrible experience for developers that paste code snippets into Evernote.  I can't stand this limitation any longer, I'm cancelling my subscription.

  • Like 1

Share this post


Link to post

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),
                                  UnSafeCast
                                    (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?

Share this post


Link to post

Strongly agree. +1 +1 +1. I paste my notes in all the time with tabs. Just preserve tabs, or even convert them to 4 spaces each. Ready to quit my evernote account over this.

Share this post


Link to post

Far from ideal solution is to paste it into Notes first, that way it preserves indentation. But please fix this!

Share this post


Link to post

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...