I want to display code through `<pre>` and/or `<code>` tags, which works fine. White spaces are saved on first save and displayed properly in the front-end. However, when reloading the content in the backend, the editor shows the code without the additional whitespaces. Saving again drops the whole code formatting. 

I assume there is some setting for this but I couldn't find anything until now. Any hints on this?

For the code highlighting, I am using the `GeshiLib` and `vjrtecodesnippets`extensions. 

**Edit:** 

Sorry, missed the configuration. There is the basic `rtehtmlarea` involved, currently v4.7.5, there is no TCA specific change since it is a standard bodytext field from TYPO3's standard *Text content element* (displayed through `css_styled_content`).

PageTS for the RTE looks like the following:

```
RTE.default.hidePStyleItems := removeFromList(pre)
RTE.default.proc {
  allowTags := addToList(pre)
  entryHTMLparser_db.allowTags < RTE.default.proc.allowTags

  overruleMode = tx_vjrtecodesnippets,ts_css,cleanenc
  allowTags := addToList(code)
  allowTagsOutside := addToList(code)

  entryHTMLparser_db {
    allowTags < RTE.default.proc.allowTags
    allowTagsOutside < RTE.default.proc.allowTagsOutside
  }

  HTMLparser_rte {
    allowTags < RTE.default.proc.allowTags
    allowTagsOutside < RTE.default.proc.allowTagsOutside
  }
}

```

**Edit2:** We've published the TYPO3 extension news\_blog which does exactly this.