Skip to content

Commit

Permalink
Reflect settings in config/ckeditor.yml.
Browse files Browse the repository at this point in the history
Set PLUGIN_FILE_MANAGER_URI and PLUGIN_FILE_MANAGER_UPLOAD_URI values copying from file_manager_uri and file_manager_upload_uri respectively in config/ckeditor.yml with appropriate defaults.

They are URI/path configuration for the file manager.  It's important when non-root URI deployment.
  • Loading branch information
YAEGASHI Takeshi committed Sep 23, 2010
1 parent 1800c22 commit 6a90e58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vendor/plugins/easy-ckeditor/lib/ckeditor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Ckeditor
begin
CONFIG = YAML.load_file("#{RAILS_ROOT}/config/ckeditor.yml")[RAILS_ENV]
rescue => e
CONFIG = nil
CONFIG = {}
end
PLUGIN_NAME = 'easy-ckeditor'
PLUGIN_PATH = "#{RAILS_ROOT}/vendor/plugins/#{PLUGIN_NAME}"
Expand All @@ -12,8 +12,8 @@ module Ckeditor
PLUGIN_CONTROLLER_PATH = "#{PLUGIN_PATH}/app/controllers"
PLUGIN_VIEWS_PATH = "#{PLUGIN_PATH}/app/views"
PLUGIN_HELPER_PATH = "#{PLUGIN_PATH}/app/helpers"
PLUGIN_FILE_MANAGER_URI = '/fm/filemanager'
PLUGIN_FILE_MANAGER_UPLOAD_URI = '/ckeditor/upload'
PLUGIN_FILE_MANAGER_URI = CONFIG['file_manager_uri'] || '/fm/filemanager'
PLUGIN_FILE_MANAGER_UPLOAD_URI = CONFIG['file_manager_upload_uri'] || '/ckeditor/upload'

module Helper
def ckeditor_textarea(object, field, options = {})
Expand Down

0 comments on commit 6a90e58

Please sign in to comment.