Skip to content

Commit

Permalink
Merge pull request galetahub#108 from joe1chen/master
Browse files Browse the repository at this point in the history
CKEDITOR.replace should be called from within $(document).ready block.
  • Loading branch information
galetahub committed Apr 13, 2012
2 parents 10215ad + acc9414 commit 34ee3f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/ckeditor/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def js_replace(dom_id, options = {})
else
js << "CKEDITOR.replace('#{dom_id}', { #{js_options} });"
end
js.join

"$(document).ready(function(){ #{js.join} });".html_safe
end

def js_fileuploader(uploader_type, options = {})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CkeditorAttachmentFileUploader < CarrierWave::Uploader::Base
# Override the directory where uploaded files will be stored.
# This is a sensible default for uploaders that are meant to be mounted:
def store_dir
"ckeditor_assets/attachments/#{model.id}"
"system/ckeditor_assets/attachments/#{model.id}"
end

# Provide a default URL as a default if there hasn't been a file uploaded:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CkeditorPictureUploader < CarrierWave::Uploader::Base
# Override the directory where uploaded files will be stored.
# This is a sensible default for uploaders that are meant to be mounted:
def store_dir
"ckeditor_assets/pictures/#{model.id}"
"system/ckeditor_assets/pictures/#{model.id}"
end

# Provide a default URL as a default if there hasn't been a file uploaded:
Expand Down

0 comments on commit 34ee3f3

Please sign in to comment.