app/assets/javascripts/brightcontent/attachments.js.coffee in brightcontent-attachments-2.3.1 vs app/assets/javascripts/brightcontent/attachments.js.coffee in brightcontent-attachments-2.3.2

- old
+ new

@@ -1,11 +1,10 @@ #= require jquery-fileupload/basic #= require spin $ -> request_url = $("#attachable_url").val() - editor = $("#insertable").data("wysihtml5").editor spinner = new Spinner().spin() $('#fileupload').fileupload method: "PUT" send: -> @@ -21,14 +20,16 @@ $("#fileupload").attr disabled: false $("#attachments-controls").css opacity: 1 $("#attachments").on "click", ".insert-image", (e) -> e.preventDefault() + editor = $("#insertable").data("wysihtml5").editor editor.composer.commands.exec "insertImage", src: $(this).attr "href" $("#attachments").on "click", ".insert-link", (e) -> e.preventDefault() + editor = $("#insertable").data("wysihtml5").editor editor.composer.commands.exec "createLink", href: $(this).attr "href" target: "_blank" rel: "nofollow" text: $(this).data("name")