The default editor will let you insert a code using the Formatted (click on Normal dropdown) option, i.e.
var cow = new Mammal( "moo", { legs: 4 } );
Or you can also adjust the editor to include this plugin: https://ckeditor.com/cke4/addon/codesnippet
With the Markdown editor you can format text as code by indenting it with 4 spaces. Alternatively you can also put text in <pre> tags to have it rendered as a code block.
This would be rendered as regular text. This would be rendered as code. <pre> This would also be rendered as code. </pre>
This would be rendered as regular text.
This would be rendered as code.
<pre> This would also be rendered as code. </pre>
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.