forked from a-ono/redmine_ckeditor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.rb
30 lines (23 loc) · 914 Bytes
/
init.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
28
29
30
require 'redmine'
require 'redmine_ckeditor'
Rails.application.config.to_prepare do
RedmineCkeditor.apply_patch
end
Redmine::Plugin.register :redmine_ckeditor do
name 'Redmine CKEditor plugin'
author 'Akihiro Ono'
description 'This is a CKEditor plugin for Redmine'
version '1.1.5'
requires_redmine :version_or_higher => '3.0.0'
url 'http://github.com/a-ono/redmine_ckeditor'
settings(:partial => 'settings/ckeditor')
wiki_format_provider 'CKEditor', RedmineCkeditor::WikiFormatting::Formatter,
RedmineCkeditor::WikiFormatting::Helper
end
class CKEditorSpoilerHookListener < Redmine::Hook::ViewListener
def view_layouts_base_html_head(context)
javascript_include_tag('spoiler.js', :plugin => :redmine_ckeditor) +
stylesheet_link_tag('spoiler.css', :plugin => :redmine_ckeditor)
end
end
Loofah::HTML5::WhiteList::ALLOWED_PROTOCOLS.replace RedmineCkeditor.allowed_protocols