# How to i properly paste code in my posts here?

**URL:** <https://www.phphelp.com/t/how-to-i-properly-paste-code-in-my-posts-here/30310>\
**Category:** Comments and Questions\
**Created:** [November 1, 2019, 7:40am UTC](https://www.phphelp.com/t/how-to-i-properly-paste-code-in-my-posts-here/30310 "2019-11-01T07:40:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaesoulmc](https://www.phphelp.com/letter_avatar_proxy/v4/letter/j/4bbf92/32.png) [@jaesoulmc](https://www.phphelp.com/u/jaesoulmc)\
**Post date:** [November 1, 2019, 7:40am UTC](https://www.phphelp.com/t/how-to-i-properly-paste-code-in-my-posts-here/30310/1 "2019-11-01T07:40:06Z")

</div>

All , before I go asking questions on this forum, i was wondering how do I paste code within a post, so it does not lose its text formatting when I submit it.

I tried just pasting my code directly in, and I notice it condenses the code in single lines and loses all its formatting when I submit. Thanks again!

---

<div class="post-metadata">

**Author:** ![chorn](https://www.phphelp.com/letter_avatar_proxy/v4/letter/c/b5ac83/32.png) [@chorn](https://www.phphelp.com/u/chorn)\
**Post date:** [November 1, 2019, 8:51am UTC](https://www.phphelp.com/t/how-to-i-properly-paste-code-in-my-posts-here/30310/2 "2019-11-01T08:51:27Z")

</div>

Did you have a closer look at the editor? There’s this button: **\</\>** that should mostly preserve any code formatting.

---

<div class="post-metadata">

**Author:** ![jaesoulmc](https://www.phphelp.com/letter_avatar_proxy/v4/letter/j/4bbf92/32.png) [@jaesoulmc](https://www.phphelp.com/u/jaesoulmc)\
**Post date:** [November 1, 2019, 11:42pm UTC](https://www.phphelp.com/t/how-to-i-properly-paste-code-in-my-posts-here/30310/3 "2019-11-01T23:42:26Z")

</div>

Thank you chorn, I ended up using the bbcode for entering code into posts.
