Jump to content

How do I add code blocks


Recommended Posts

I could have sworn there was an option at the top of each notebook to add a code block but I cant find it now and searching online it seems like i'm the only person experiencing this problem. I feel like I jumped into a timeline where the codeblock format never existed or I'v gone mad. Please does anyone remember there being a code block format option and more importantly is there a way to add codeblocks now that the option seems to be gone?

Capture.PNG

Edited by JeremyToler
Spelled Do wrong
  • Like 6
Link to post
  • Level 5*

The tool to create code blocks in the Evernote Windows client is in the note editor panel:

image.png.df4c872f19c48f299dc685984f2704fc.png

You can also use the Ctrl+Shift+L to create a new code block (either by itself, or around selected text)

  • Like 1
Link to post
  • Level 5*

I moved the discussion to the web forum.

The answer is the same; the icon is on the edit toolbar.
Note: You have to be editing a note to see this toolbar.

The image is from Mac/Safari
5ab426468c9c5_ScreenShot2018-03-22at14_52_47.png.300e51389f8b12919a85b9d61a39d089.png

  • Like 1
  • Confused 1
Link to post
  • Level 5*
3 minutes ago, JeremyToler said:

I just realized I posted this in the wrong area, I'm using the web version of Evernote. 

Not sure you if there is a code block icon in the web version?  I don't see one, Regular or New web.

  • Like 2
Link to post
  • Level 5*
1 minute ago, JeremyToler said:

Looks like its not just me :( 

 

 

Hopefully this isn't an EN feature "improvement" exercise....

  • Like 1
Link to post
  • Evernote Staff

@JeremyToler @CalS A recent change in Chrome broke part of what supported that, so we had to revert to an earlier version. All other clients (including the new web client that's currently business-only) should still have it, and it should work in Safari.

  • Like 1
  • Thanks 1
Link to post
  • Evernote Staff

Hmm, well it's definitely working in Safari.

Edit: Ah, I see. We had only been able to update it to the version that had code blocks in WebKit-based browsers (Chrome, Safari). Chrome has broken it, so only Safari remains. And the native clients, of course. So Firefox never actually had code blocks.

  • Sad 1
Link to post
  • 3 weeks later...
  • Evernote Staff

@nuke It's not just code blocks that broke, but the whole editor. It's running off of an old version of the editor until the new web client. Apparently fixing the editor without the new web client wasn't easy, but I can only speculate as to why.

  • Thanks 1
Link to post

Please fix this ASAP.  I make heavy use of code blocks in my notes, and without a clear ETA on when it's coming back I am forced to look for alternatives.  I am on Linux so I don't have an option to use a standalone client.

  • Like 1
Link to post
On 3/22/2018 at 11:55 PM, rezecib said:

@JeremyToler @CalS A recent change in Chrome broke part of what supported that, so we had to revert to an earlier version. All other clients (including the new web client that's currently business-only) should still have it, and it should work in Safari.

While you guys are at it, can you please allow code blocks for Firefox as well? I never understood why you never added this to FF.

Link to post

The lack of Code Block support is a showstopper for me. I use Evernote mainly for studying programming and tech related books, and the ability to format code samples is essencial.

As I use FF in Linux (and the iOS app) mainly, most of the time I have no access to the Windows App (that apparently has this feature).

 

  • Like 1
Link to post
  • Level 5*
1 hour ago, jean.lourenco said:

The lack of Code Block support is a showstopper for me. I use Evernote mainly for studying programming and tech related books, and the ability to format code samples is essencial.

There's nothing stopping you from just formatting the code using Courier New, is there? Beyond that, there's not that much special about Evernote code blocks except for the outline and background color; you don't get any special text handling, syntax coloring, tab support, etc.

Yes, I am a software developer, and I use Evernote for my job and related research.

Link to post
1 hora atrás, jefito disse:

There's nothing stopping you from just formatting the code using Courier New, is there?

Yep, I didn't notice how the code would 'pop-up' on the Courier New from the stardard text. Looks nice!

My problem with the formatting is code looking like normal text, and that was solved by the Code Block.

And I've just discovered that Courier New is monospaced, so another plus.

Thanks!

  • Like 1
Link to post
  • 2 weeks later...

This is a major show stopper for me! I am a researcher and keep my research notes in Evernote. I have hundreds of notes densely interspersed with pre-formatted code fragments. Not being able to insert code is a disaster as now I will have to switch to different notetaking software and somehow migrate my notes.

As a paid customer I demand to know when this regression will be fixed. When I paid for your software the feature was present and removing it is unacceptable.

 

 

Link to post
On 4/30/2018 at 8:36 AM, jefito said:

There's nothing stopping you from just formatting the code using Courier New, is there? Beyond that, there's not that much special about Evernote code blocks except for the outline and background color; you don't get any special text handling, syntax coloring, tab support, etc.

 Yes, I am a software developer, and I use Evernote for my job and related research.

There is whitespace handling. When I paste code all my whitespace is gone. This was not a problem in code blocks.

Link to post

Hello everybody !   Finally , i found a solution for this today !! Hopefully it will work for you. I'm using a Mac, so i don't know if is going to work on Windows... 

I use the app downloaded from the appStore, which doesn't have the 'codeblock' option. To my surprise, i try to use Evernote entering from Safari, and it has the 'codeblock' option !! So, this may be an immediate solution...

However, i wanted to have this on the desktop app, so i do this:

  1. Close everything relationated with evernote. Delete the app from your mac ( right click on the application --> remove ).
  2. Open Safari
  3. Go to https://evernote.com/
  4. Click : "download the app" 
  5. Wait for a second. It should be downloading the app
  6. Of course, then, install it

Now you have the desktop app (again). Open evernote, log in with your user, and go to preferences/software uptade ( or similar ) --> activate the codeblock checkbox

Link to post
  • Evernote Staff

@fornix @cynthiayeung Hmm, I would've expected code blocks to be in the app store version. There's an option in the app's preferences for it-- in the app, Evernote > Preferences... > Software Update > Enable code block (at the bottom). Maybe they're saving config in different places and it happened to be disabled in the app store version's config? Edit: Software Update tab doesn't exist in App Store version, which I guess makes sense. I submitted a bug ticket for this and it seems to have caught some attention, yay.

@sgtsunshine I would love to be able to tell you otherwise, but I haven't heard anything since, I think the plan is still to "fix" it by releasing the new web client as soon as it's ready. It's possible that third-party wrappers of the web client like Tusk may still be able to support it (if they are using an older version of a browser embedded), so that's something to look into if you want it back sooner.

Link to post

As a developer working on Windows, Linux and Mac I use the Web client to keep track of notes and code. One of the main reasons I decided to pay for EN is the code formatting tool! I guess I won't be renewing my premium account and will go back to Simplenote. What I find amazing is the complete lack of urgency from the EN team to help us, the paying client.

Disappointed.

Link to post

This accident made me realize that I could not trust Evernote with a bulk of important information I keep in notes. Such arbitrary changes breaking existing functionality without clear estimate when it would be fixed are unacceptable. I am paying customer after all and removing functionality I am paid for is the breach of the agreement.

To put my money where my mouth is, I exported all my notes using CloudHQ to Google Drive, deleted them from Evernote and downgraded my account from premium to basic (I will close it later). I will be no longer using EverNote and will not renew my subscription.

If somebody thinking about alternatives, after some research I decided to use Google Drive/Docs for longer notes and Google Keep for short transient ones. 

Link to post

I can confirm that the code block works normally on the new web application. It is already available for business accounts. So I guess it should be ready for personal accounts very soon. This should fix a lot of problems people are facing with Chrome lately.

Link to post
  • 2 weeks later...
On 5/20/2018 at 3:44 AM, Eduardo Estefano said:

I can confirm that the code block works normally on the new web application. It is already available for business accounts. So I guess it should be ready for personal accounts very soon. This should fix a lot of problems people are facing with Chrome lately.

Please evernote team, can we have a release date ??

Link to post
  • 2 weeks later...

I use EN web on my linux machine. I was heavy user of EN due to its 'code block' feature. I used to take all my programming notes there. I was furious when they removed this. I even waited for 2-3 months for them to fix it. I was very optimistic. But sadly, last month I shifted everything to an alternative (not mentioning the name here). Highly disappointed.

Few suggestion for anyone who is in EN (if listening) :

1) Evernote is not only used for uploading of bills, quick snapshot etc. Many many programmers use Evernote for note taking purpose. Please include more features which will help us. 

2) Kindly bring back the code block with code formatting. 

  • Like 1
Link to post
  • 1 month later...
在 2018/3/23 在 AM5點31分, jefito說:

The tool to create code blocks in the Evernote Windows client is in the note editor panel:

image.png.df4c872f19c48f299dc685984f2704fc.png

You can also use the Ctrl+Shift+L to create a new code block (either by itself, or around selected text)

1

 

Hi,

How do you keep the syntax highlight color in Evernote's code block?

 

Thanks.

 

 

Link to post
在 2018/6/20 在 PM6點40分, anil123說:

I use EN web on my linux machine. I was heavy user of EN due to its 'code block' feature. I used to take all my programming notes there. I was furious when they removed this. I even waited for 2-3 months for them to fix it. I was very optimistic. But sadly, last month I shifted everything to an alternative (not mentioning the name here). Highly disappointed.

Few suggestion for anyone who is in EN (if listening) :

1) Evernote is not only used for uploading of bills, quick snapshot etc. Many many programmers use Evernote for note taking purpose. Please include more features which will help us. 

2) Kindly bring back the code block with code formatting. 

 

I guess if someone can develop the same functionality as Evernote PLUS the syntax highlight feature for programming languages, that will be a hit to the market and take away some clients from Evernote.

 

 

 

Link to post
  • 4 weeks later...

Evernote seems to be the typical company that constantly throws new features on the market that no one wants or needs (Work chat?!). At the same time, it fails to provide a stable product. In the early days, I would regularly lose notebooks because the syncing sucked. In addition, when it synced a note, the editor would jump to the top of the note - super annoying if you are working on a long note and are somewhere at the end. For the longest time, you couldn't resize images in Evernote (WTF?). Believe me or not, it is these small things that immediately tell you if a product is developed by a skilled team. Now I am wasting my morning trying to get the code blocks in Evernote Web working.

Now you might say to use the Desktop version if you want code blocks. Nope, on Linux, there is no ***** support for Desktop (see a million threads on this topic). Linux is my Developer Machine (also use Mac and Windows). Don't even get me started on Open Source Clients.
Now you might say to use the Web Client if you want code blocks. Nope, there is no code block in FF on Web Client. The latest FF is amazing - why would you not support this?
Now you might say to try the new Beta if you want code blocks. Try again.

Selection_035.png.f64de344b55b6f8c37c1b699d1c40833.png

Q.E.D.

Btw, I am/was a paying customer. As soon as something better comes along I will ditch Evernote for good.

  • Like 2
Link to post
  • 3 weeks later...
  • 2 weeks later...
Em 26/05/2018 at 16:52, jumarko disse:

The feature that I miss a lot though is a proper indentation of code blocks. As far as I know, you cannot create indented code blocks anymore.

See the following link for more information: https://discussion.evernote.com/topic/106520-indent-and-code-block-issue/

This.

I spend more time re indenting my pasting that writing most of the time, sadly.

Link to post
Em 28/07/2018 at 05:43, NeoCreative disse:

 

Hi,

How do you keep the syntax highlight color in Evernote's code block?

 

Thanks.

 

 

If I copy paste from my IDE (vscode) it will keep the color, but it translates to whatever color palet evernote uses and it is a mess in the end, also, it breaks indentation completely.

 

 

Untitled.jpg

Link to post

I just want to bring up something I had mentioned earlier, which may be useful to some...
Evernote is a great tool for general note taking.
But when it comes to code blocks, and given all of the trouble we're having with Evernote's implementation of it, I have recently started using https://boostnote.io/ for those notes that are heavy on code snippets.  Apologies if it's a bit awkward to promote an alternative product in this forum, but I don't see it as a direct competitor.  It's just better for the niche use-case of developer oriented notes.

Link to post
  • 3 weeks later...

Hi,

as a longterm Evernote-user and a developer, this is a must-have feature for me.
Especially Syntax-highlighting, space-stability (eg. for python) and output-result on all clients is essential.

So i came with a custom solution by using pygments on Python.
This allows me to render code-xml that is tailored to Evernotes restricted xml-dialect, so the result looks the same on the latest browser and Evernote-clients.

Unfortunately there is no library in JS that fulfills this requirements, so i wrote an aws-lambda-microservice for it and a vue-js page to make it accessible.

It create an Evernote-export-file (.enex) with the information of:

 

  • - title (the notes title)
  • - language (the code languages - current it supports 100 languages from abab to YAML)
  • - the author (if needed)

which you can import to Evernote.

At the moment it just support one code per note.
If you need several code-blocks in one note, you can copy from a note and paste.

It works for me so far, if you are interested, i have an idea for an editor, where you can enter mixed-content and save the note direct to Evernote per API.
 

This is how it works

save-evernote.gif

 

Here is the deeplink of that tool
https://annoyingdev.com/save-code-with-highlighting-on-evernote

ps. - this tool is free, i try to keep that as stable as possible.
if you find issues, just send me a message.

I'm looking forward for your feedbacks.

Link to post
  • 1 month later...

On Chrome, click on your profile avatar and go to Settings. From there, find the section near the bottom called "Evernote Web". Click to use the Beta version. You should be able to use code blocks now.

Definitely frustrating not having the code blocks feature as a developer.

Link to post
  • 5 months later...

Hello!

In 2019 there's an option to switch to new editor under the account options.

It's weird why they wouldn't automatically switch to new editor. That is why I am posting it here so that people coming here would find it. I struggled a lot to find it.

 

Link to post
  • 3 months later...
  • 2 months later...
On 10/22/2019 at 7:54 AM, lordfox_ said:

Thanks 2019!

After switching to the new version in your account options.
The code block option appear under an "Insert" button as in the attached picture.

Tested on Chrome and Firefox, ubuntu 18

 

Screenshot from 2019-10-22 15-50-20.png

so cool, fix it finally~

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