Problems with this editor

I am having trouble with this comment editor.

If I want to insert a code sample, and click on the code button, I get:

indent preformatted text by 4 spaces

OK, but indenting is a headache:

  • Typing four or more spaces is a nuisance — please enable the tab key to do this.
  • Copy & Paste, for some reason doesn’t do the job. If I paste spaces, the preview doesn’t seem to realise that the code is indented, so I need to re-type the spaces.

Actually, I’ve just written an addon to fix this problem …

Are you talking about discourse or addons.mozilla.org? If you’re talking about discourse, you can either surround code samples by ` for inline code or with ``` for blocks, like on GitHub and other Markdown supporting places.

If this is about discourse you posted in the wrong category, btw.