             return currentCaretPosition - removedLineLength + 1
 
         markdownSettings =
-            nameSpace: 'markdown'
-            onShiftEnter: {keepDefault:false, openWith:'\n\n'}
+            nameSpace: "markdown"
+            onShiftEnter: {keepDefault:false, openWith:"\n\n"}
             onEnter:
                 keepDefault: false
                 replaceWith: (data) =>

                {
                    name: $tr.t("markdown-editor.link")
                    key: "L"
                    openWith: '['
                    closeWith: ']([![Url:!:http://]!] "[![Title]!]")'
                    placeHolder: $tr.t("markdown-editor.link-placeholder")
                },
                {
                    separator: '---------------'
                },
                {
                    name: $tr.t("markdown-editor.quotes")

                $model.$setViewValue(target.val())

        markdownTitle = (markItUp, char) ->
            heading = ""
            n = $.trim(markItUp.selection or markItUp.placeHolder).length

            for i in [0..n-1]
                heading += char

            return "\n"+heading+"\n"

        element.markItUp(markdownSettings)
        element.on "keypress", (event) ->
            $scope.$apply()

