app/assets/javascripts/spina/admin/trix.coffee.erb in spina-0.11.1 vs app/assets/javascripts/spina/admin/trix.coffee.erb in spina-0.12.0
- old
+ new
@@ -28,11 +28,12 @@
group: false
}
class Spina.TrixAttachment
@photoSelect: (e) ->
+ console.log 'hi'
editor_id = $(this).closest('trix-toolbar').data('trix-editor-id')
- $.get("<%= Spina::Engine.routes.url_helpers.wysihtml5_select_admin_photos_path('') %>/#{editor_id}")
+ $.get("<%= Spina::Engine.routes.url_helpers.trix_select_admin_photos_path('') %>/#{editor_id}")
@photoInsert: (e, url) ->
length = this.editor.getDocument().toString().length
this.editor.setSelectedRange(length - 1)
this.editor.insertHTML "<img src='#{ url }' />"