Permalink
Browse files

Merge pull request #108 from joe1chen/master

CKEDITOR.replace should be called from within $(document).ready block.
  • Loading branch information...
2 parents 10215ad + acc9414 commit 34ee3f32c34d60e0e5d53f41e7b54bad2959f675 @galetahub committed Apr 13, 2012
View
@@ -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 = {})
@@ -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:
@@ -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:

0 comments on commit 34ee3f3

Please sign in to comment.