         @editSession.setUseSoftTabs true
         @editor.setReadOnly !@freeEdit
 
+        if @wrapCode
+            @codeText = @codePrefix + codeText + '\n' + @codeSuffix
+        else
+            @codePrefix = ""
+            @codeSuffix = ""
+            @codeText = codeText
+
         @codePrefixLength = codePrefix.split('\n').length - 1
-        @codeSuffixLength = codeSuffix.split('\n').length
-
-        @codeText = @codePrefix + codeText + '\n' + @codeSuffix
+        @codeSuffixLength = codeSuffix.split('\n').length - 1
 
         @enableKeyboardShortcuts()
 

        editorDiv.append '<div id="parameter-pop-up" class="pop-up-container"></div>'

        @editor = new PlayerCodeEditor 'ace-editor', \
            @commands, @codeConfig.initial, @codeConfig.prefix, @codeConfig.postfix, \
            @editorConfig.freeformEditting
        @interpreter = new CodeInterpreter @commands

        @setUpInsertButtons()

    ###
        Creates and provides functionality for an Ace editor representing player's code.
    ###
    constructor: (@editorDivId, @commands, codeText, @wrapCode, @codePrefix, @codeSuffix, @freeEdit) ->
        ###
            Sets internal variables, the default text and buttons
            and their event handlers.
