tiny_mce_article.rb
692 Bytes
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
28
29
30
31
32
33
34
35
36
37
38
39
require 'white_list_filter'
class TinyMceArticle < TextArticle
def self.short_description
_('Text article with visual editor')
end
def self.description
_('Not accessible for visually impaired users.')
end
xss_terminate :only => [ ]
xss_terminate :only => [ :name, :abstract, :body ], :with => 'white_list', :on => 'validation'
include WhiteListFilter
filter_iframes :abstract, :body
def iframe_whitelist
profile && profile.environment && profile.environment.trusted_sites_for_iframe
end
def notifiable?
true
end
def tiny_mce?
true
end
def can_display_media_panel?
true
end
def self.can_display_blocks?
false
end
end