                                 output.data('blobs',[])  # used to track visible files displaying data from database blob store
                             if mark.processed < x.length-1
                                 # new output to process
+                                if mark.finish_editing?
+                                    mark.finish_editing()
                                 t = x.slice(mark.processed, x.length-1)
                                 for s in t.split(MARKERS.output)
                                     if s.length > 0

        #@html_editor_div?.focus()

    init_html_editor_buttons: () =>
        button_bar = @element.find(".salvus-editor-codemirror-worksheet-editable-buttons")
        button_bar.show()

        that = @
        button_bar.find("a").click () ->

                that.html_editor_restore_selection()
                button_bar_input.colorpicker('show')

            set("#fff8bd")

        init_background_color_control()

