DEV Community

Darrell Washington
Darrell Washington

Posted on

Slow Moment

How do you embed or add code in comments and posts. I've been trying to do this for awhile now lol.

Top comments (3)

Collapse
 
jess profile image
Jess Lee

Have you checked out our editor guide? That should give you some basic markdown examples (the syntax we should to power both articles and comments), along with some special syntax we've created specially for dev.to (like embedding videos and other posts).

Collapse
 
inceptioncode profile image
Darrell Washington • Edited

I have looked at it. I've tried copying and pasting one of the examples and it didn't work. I assume you use this runkit tag...

console.log("Place javascript here!");

But that doesn't seem to work unless I am doing it wrong.

Collapse
 
kubistmi profile image
kubistmi

Hello Darell,
I have just come across the same problem!
Fortunately, the usual markdown trick is working just fine!

simply put your code between three backticks #```




Cheers,
Michal