Title: Visual editor messing up the html code
Last modified: September 9, 2016

---

# Visual editor messing up the html code

 *  [enuriru](https://wordpress.org/support/users/enuriru/)
 * (@enuriru)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/visual-editor-messing-up-the-html-code/)
 * Problem: visual editor messes up tabs & line breaks in html code.
    I use [WP Editor](https://wordpress.org/plugins/wp-editor/)
   for syntax highlighting and [RAW HTML](https://wordpress.org/plugins/raw-html/).
 * I know that raw html offers a pro version but it requires to wrap my code into
   additional tags and makes it read-only in visual editor.
 * So how to use visual editor without breaking the code?

Viewing 1 replies (of 1 total)

 *  [ThemeSumo](https://wordpress.org/support/users/themesumo/)
 * (@themesumo)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/visual-editor-messing-up-the-html-code/#post-8171431)
 * I use [this tool](http://www.web2generators.com/html-based-tools/online-html-entities-encoder-and-decoder)
   to encode HTML code for displaying it within posts, just wrap within `<code>`
   tags using the **Text** mode of the editor.
 * Hope this helps.

Viewing 1 replies (of 1 total)

The topic ‘Visual editor messing up the html code’ is closed to new replies.

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [visual editor](https://wordpress.org/support/topic-tag/visual-editor/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [ThemeSumo](https://wordpress.org/support/users/themesumo/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/visual-editor-messing-up-the-html-code/#post-8171431)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
