-
Notifications
You must be signed in to change notification settings - Fork 13
/
fckeditor_extension.rb
27 lines (23 loc) · 1.04 KB
/
fckeditor_extension.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Uncomment this if you reference any of your controllers in activate
require_dependency 'application_controller'
class FckeditorExtension < Radiant::Extension
version "0.5"
description "Adds the FCKEditor editor - with file uploads and spell checking."
url "http://github.com/djcp/radiant-fckeditor/tree/master"
# ActionView::Base.send(:include, Fckeditor::Helper)
define_routes do |map|
map.connect 'fckeditor/:action', :controller => '/fckeditor'
map.connect 'fckeditor/check_spelling', :controller => '/fckeditor', :action => 'check_spelling'
map.connect 'fckeditor/command', :controller => '/fckeditor', :action => 'command'
map.connect 'fckeditor/upload', :controller => '/fckeditor', :action => 'upload'
end
def activate
# admin.tabs.add "Fckeditor", "/admin/fckeditor", :after => "Layouts", :visibility => [:all]
FckeditorFilter
Admin::PagesController.send :include, FckeditorInterface
admin.page.edit.add :part_controls, "editor_control"
end
def deactivate
# admin.tabs.remove "Fckeditor"
end
end