HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

Pre sections in Knowledge Books


Hi All,

I am including code snippets in some of our knowledge books which span multiple lines and naturally have indenting.

When i go to the “HTML edit” option for the page, I can enter the pre section, but when I save it, only the first line of the pre section keeps the spaces on the front of the line.

Any ideas? Ian, could this be a bug - maybe lines are being “trimmed” to remove whitespace?

The first ASCII diagram is displaying the spaces on the first line, but no others.


You’re using the wysiwyg right? It might be removing some of that white space. I’ve marked this as a bug for now to research it. In the meantime we use pre a lot here for code examples, but we don’t use the wysiwyg. You might try turning it off in your preferences and just putting the HTML in the KB box directly and see if that works.



Yep, that fixed it! Cheers.



Great, let us know if you have any other trouble!