Module: Ckeditor::Rails
- Defined in:
- lib/ckeditor-rails.rb,
lib/ckeditor-rails/asset.rb,
lib/ckeditor-rails/engine.rb,
lib/ckeditor-rails/engine3.rb,
lib/ckeditor-rails/railtie.rb,
lib/ckeditor-rails/version.rb,
lib/ckeditor-rails/asset_url_processor.rb
Defined Under Namespace
Classes: Asset, AssetUrlProcessor, Engine, Railtie
Constant Summary
collapse
- VERSION =
'4.17.0'
- EDITOR_VERSION =
'4.19.0'
- @@assets_languages =
nil
- @@assets_plugins =
nil
- @@assets_skins =
nil
- @@assets_base_path =
nil
Class Method Summary
collapse
Class Method Details
.assets_base_path ⇒ Object
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# File 'lib/ckeditor-rails.rb', line 64
def assets_base_path
return @@assets_base_path unless @@assets_base_path.nil?
if @@assets_base_path.respond_to? :call
self.assets_base_path = @@assets_base_path.call
elsif !@@assets_base_path.is_a? String
self.assets_base_path = default_base_path
end
relative_path = ::Rails.application.config.action_controller.relative_url_root
self.assets_base_path = File.join(relative_path, @@assets_base_path) if relative_path && @@assets_base_path
self.assets_base_path = @@assets_base_path.sub(/\/\z/, '') if @@assets_base_path.ends_with?('/')
@@assets_base_path
end
|
19
20
21
|
# File 'lib/ckeditor-rails.rb', line 19
def configure
yield self
end
|
.default_base_path ⇒ Object
58
59
60
61
62
|
# File 'lib/ckeditor-rails.rb', line 58
def default_base_path
return "#{::Sprockets::Railtie.config.assets.prefix}/ckeditor" if defined? ::Sprockets
"#{::Rails.application.config.assets.prefix}/ckeditor"
end
|
.default_plugins ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/ckeditor-rails.rb', line 27
def default_plugins
%W[
a11yhelp
about
clipboard
colordialog
dialog
div
find
flash
forms
iframe
image
link
liststyle
pastefromword
preview
scayt
smiley
specialchar
table
tabletools
templates
wsc
]
end
|
.default_skins ⇒ Object
54
55
56
|
# File 'lib/ckeditor-rails.rb', line 54
def default_skins
%w[moono-lisa]
end
|
.root_path ⇒ Object
23
24
25
|
# File 'lib/ckeditor-rails.rb', line 23
def root_path
@root_path ||= Pathname.new(File.expand_path('..', __FILE__))
end
|