Code filter fix and help

I was trying to use code filter module for this page, but without any luck. As most users i was getting this error and couldn't do anything to make it work. So I made my own solution for this. I created CSS class

.content .code {
  padding: 5px;
  border: 1px solid #CCC;
  background-color: #EEE;
  line-height: 18px;
}

I am using BUE editor where you can easily edit how "code" button will format text when you click it so you just added in BUE configuration

[div class="code"]%TEXT%[/div]

And now when I select some text and click on Code button i just get what i wanted without additional module and additional headaches.

Warning: This won't work if you have HTML code you need to escape. For this you will need
to add another button to BUE editor, add Escape/Replace tags button with this JS code


js: E.replaceSelection(Drupal.checkPlain(E.getSelection()));

and then you first escape your html code then put a CODE div around it and you are ready to go.