     $(child).val beforeSelection + text + afterSelection
     $(".markdown-area").trigger "input"
 
-  getFilename = (e) -> 
+  getFilename = (e) ->
     if window.clipboardData and window.clipboardData.getData
       value = window.clipboardData.getData("Text")
     else if e.clipboardData and e.clipboardData.getData
       value = e.clipboardData.getData("text/plain")
-    
+
     value = value.split("\r")
     value.first()
 

  btnAlert = "<button type=\"button\"" + alertAttr + ">&times;</button>"
  project_image_path_upload = window.project_image_path_upload or null

  $("textarea.markdown-area").wrap "<div class=\"div-dropzone\"></div>"  
  
  $(".div-dropzone").parent().addClass "div-dropzone-wrapper"

  $(".div-dropzone").append divHover
  $(".div-dropzone-hover").append iconPicture
  $(".div-dropzone").append divSpinner 
  $(".div-dropzone-spinner").append iconSpinner
  $(".div-dropzone-spinner").css
    "opacity": 0

  dropzone = $(".div-dropzone").dropzone(
    url: project_image_path_upload
    dictDefaultMessage: ""
    clickable: true
    paramName: "markdown_img"
    maxFilesize: 10
    uploadMultiple: false
    acceptedFiles: "image/jpg,image/jpeg,image/gif,image/png"
    headers:
      "X-CSRF-Token": $("meta[name=\"csrf-token\"]").attr("content")

    previewContainer: false
