-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Akihiro Ono
committed
Mar 31, 2010
0 parents
commit 20de892
Showing
568 changed files
with
103,396 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
= Redmine CKEditor plugin | ||
|
||
This plugin adds the text formatting for using CKEditor to Redmine. | ||
|
||
== What is CKEditor? | ||
|
||
CKEditor is a WYSIWYG text editor. | ||
See {the official site}[http://ckeditor.com/] for more details. | ||
|
||
== Requirements | ||
|
||
* Redmine 0.9.x | ||
|
||
== Plugin installation and setup | ||
|
||
1. Copy the plugin directory into the vendor/plugins directory | ||
2. Start Redmine | ||
3. Change text formatting (Administration > Settings > General > Text formatting) to CKEditor | ||
4. Configure the plugin (Administration > Plugins > Configure) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
class RedmineCkeditorSetting | ||
def self.setting | ||
Setting[:plugin_redmine_ckeditor] || {} | ||
end | ||
|
||
def self.default | ||
["1", true].include?(setting[:default]) | ||
end | ||
|
||
def self.toolbar | ||
buttons = setting[:toolbar] || RedmineCkeditor::DEFAULT_TOOLBAR | ||
|
||
if buttons.is_a?(String) | ||
bars = [] | ||
bar =[] | ||
buttons.split(",").each {|item| | ||
if item == "/" | ||
bars.push(bar, item) | ||
bar = [] | ||
else | ||
bar.push(item) | ||
end | ||
} | ||
|
||
buttons = bar.size > 0 ? bars.push(bar) : bars | ||
end | ||
|
||
buttons | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<% form_remote_tag(:url => {}, :html => { :id => "journal-#{@journal.id}-form" }) do %> | ||
<%= text_area_tag :notes, @journal.notes, :id => "notes-#{@journal.id}", :class => 'wiki-edit', :rows => (@journal.notes.blank? ? 10 : [[10, @journal.notes.length / 50].max, 100].min) %> | ||
<%= wikitoolbar_for "notes-#{@journal.id}" %> | ||
<%= call_hook(:view_journals_notes_form_after_notes, { :journal => @journal}) %> | ||
<%= javascript_tag "CKEDITOR.replace('notes-#{@journal.id}');" %> | ||
<p><%= submit_tag l(:button_save), :onclick => | ||
"if (typeof CKEDITOR != 'undefined' && CKEDITOR.instances['notes-#{@journal.id}']) {"+ | ||
"$('notes-#{@journal.id}').value = CKEDITOR.instances['notes-#{@journal.id}'].getData();" + | ||
"CKEDITOR.instances['notes-#{@journal.id}'].destroy();" + | ||
"}" %> | ||
<%= link_to l(:button_cancel), '#', :onclick => | ||
"if (typeof CKEDITOR != 'undefined' && CKEDITOR.instances['notes-#{@journal.id}'])" + | ||
"CKEDITOR.instances['notes-#{@journal.id}'].destroy();" + | ||
"Element.remove('journal-#{@journal.id}-form');" + | ||
"Element.show('journal-#{@journal.id}-notes'); return false;" %></p> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<p> | ||
<%= content_tag :label, l(:ckeditor_toolbar_setting) %> | ||
</p> | ||
<%= RedmineCkeditor.toolbar_selector %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# | ||
# Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. | ||
# For licensing, see LICENSE.html or http://ckeditor.com/license | ||
# | ||
|
||
# | ||
# On some specific Linux installations you could face problems with Firefox. | ||
# It could give you errors when loading the editor saying that some illegal | ||
# characters were found (three strange chars in the beginning of the file). | ||
# This could happen if you map the .js or .css files to PHP, for example. | ||
# | ||
# Those characters are the Byte Order Mask (BOM) of the Unicode encoded files. | ||
# All FCKeditor files are Unicode encoded. | ||
# | ||
|
||
AddType application/x-javascript .js | ||
AddType text/css .css | ||
|
||
# | ||
# If PHP is mapped to handle XML files, you could have some issues. The | ||
# following will disable it. | ||
# | ||
|
||
AddType text/xml .xml |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<!-- | ||
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. | ||
For licensing, see LICENSE.html or http://ckeditor.com/license | ||
--> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>Installation Guide - CKEditor</title> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
<style type="text/css"> | ||
h3 | ||
{ | ||
border-bottom: 1px solid #AAAAAA; | ||
} | ||
pre | ||
{ | ||
background-color: #F9F9F9; | ||
border: 1px dashed #2F6FAB; | ||
padding: 1em; | ||
line-height: 1.1em; | ||
} | ||
#footer hr | ||
{ | ||
margin: 10px 0 15px 0; | ||
height: 1px; | ||
border: solid 1px gray; | ||
border-bottom: none; | ||
} | ||
#footer p | ||
{ | ||
margin: 0 10px 10px 10px; | ||
float: left; | ||
} | ||
#footer #copy | ||
{ | ||
float: right; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1> | ||
CKEditor Installation Guide</h1> | ||
<h3> | ||
What's CKEditor?</h3> | ||
<p> | ||
CKEditor is a text editor to be used inside web pages. It's not a replacement | ||
for desktop text editors like Word or OpenOffice, but a component to be used as | ||
part of web applications and web sites.</p> | ||
<h3> | ||
Installation</h3> | ||
<p> | ||
Installing CKEditor is an easy task. Just follow these simple steps:</p> | ||
<ol> | ||
<li><strong>Download</strong> the latest version of the editor from our web site: <a | ||
href="http://ckeditor.com">http://ckeditor.com</a>. You should have already completed | ||
this step, but be sure you have the very latest version.</li> | ||
<li><strong>Extract</strong> (decompress) the downloaded file into the root of your | ||
web site.</li> | ||
</ol> | ||
<p> | ||
<strong>Note:</strong> CKEditor is by default installed in the "ckeditor" | ||
folder. You can place the files in whichever you want though.</p> | ||
<h3> | ||
Checking Your Installation | ||
</h3> | ||
<p> | ||
The editor comes with a few sample pages that can be used to verify that installation | ||
proceeded properly. Take a look at the <a href="_samples">_samples</a> directory.</p> | ||
<p> | ||
To test your installation, just call the following page at your web site:</p> | ||
<pre> | ||
http://<your site>/<CKEditor installation path>/_samples/index.html | ||
|
||
For example: | ||
http://www.example.com/ckeditor/_samples/index.html</pre> | ||
<h3> | ||
Documentation</h3> | ||
<p> | ||
The full editor documentation is available online at the following address:<br /> | ||
<a href="http://docs.cksource.com/ckeditor">http://docs.cksource.com/ckeditor</a></p> | ||
<div id="footer"> | ||
<hr /> | ||
<p> | ||
CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a> | ||
</p> | ||
<p id="copy"> | ||
Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico | ||
Knabben. All rights reserved. | ||
</p> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.