galetahub/ckeditor — Issue #79: Rails 3.1 Attachment link href=javascript:void(0)
Author: gmgp
Created: 2012-02-02 13:13:54+00:00
State: open

Rails 3.1.3
paperclip 2.5.2
formtastic (2.0.2)
ckeditor 3.7.0.rc2

Following the instructions in the readme everything works perfectly, only the links attached files are incorrect.

a
_cke_saved_href="/ckeditor_assets/attachments/2/name_file.pdf"
class="attach_pdf"
href="javascript:void(0)/*130*/"
title="name_file.pdf"
>
name_file.pdf
/a >

I temporarily resolved by adding app/assets/javascripts/link.js

$ (document). ready (function () {
$ ("a [_cke_saved_href |=]"). each (function () {this.href = $ (this). attr (" _cke_saved_href ")})
})

and everything seems to work, but it is only a temporary solution