Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://svn.webtest.wvu.edu/repos/rails/plugins/textile_editor@56 6731b596-9f2e-9c42-8d5b-c76208a4698c
- Loading branch information
cbscharf
committed
Mar 20, 2007
1 parent
7533806
commit 749195c
Showing
31 changed files
with
861 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,4 @@ | ||
TextileEditor | ||
============= | ||
|
||
Description goes here |
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,22 @@ | ||
require 'rake' | ||
require 'rake/testtask' | ||
require 'rake/rdoctask' | ||
|
||
desc 'Default: run unit tests.' | ||
task :default => :test | ||
|
||
desc 'Test the textile_editor plugin.' | ||
Rake::TestTask.new(:test) do |t| | ||
t.libs << 'lib' | ||
t.pattern = 'test/**/*_test.rb' | ||
t.verbose = true | ||
end | ||
|
||
desc 'Generate documentation for the textile_editor plugin.' | ||
Rake::RDocTask.new(:rdoc) do |rdoc| | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = 'TextileEditor' | ||
rdoc.options << '--line-numbers' << '--inline-source' | ||
rdoc.rdoc_files.include('README') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,182 @@ | ||
// Define Button Object | ||
function edButton(id, display, tagStart, tagEnd, access, title, sve, open) { | ||
this.id = id; // used to name the toolbar button | ||
this.display = display; // label on button | ||
this.tagStart = tagStart; // open tag | ||
this.tagEnd = tagEnd; // close tag | ||
this.access = access; // set to -1 if tag does not need to be closed | ||
this.title = title; | ||
this.sve = sve; | ||
this.open = open; // set to -1 if tag does not need to be closed | ||
} | ||
|
||
var theButtons = new Array(); | ||
var edOpenTags = new Array(); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_strong' | ||
,'str' | ||
,'*' | ||
,'*' | ||
,'b' | ||
,'Bold' | ||
,'s' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_emphasis' | ||
,'em' | ||
,'_' | ||
,'_' | ||
,'i' | ||
,'Italicize' | ||
,'s' | ||
); | ||
|
||
|
||
|
||
theButtons[theButtons.length] = new edButton('ed_underline' | ||
,'u' | ||
,'+' | ||
,'+' | ||
,'u' | ||
,'Underline' | ||
,'s' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_strike' | ||
,'S' | ||
,'-' | ||
,'-' | ||
,'s' | ||
,'Strikethrough' | ||
,'s' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_ol' | ||
,'OL' | ||
,' # ' | ||
,'\n' | ||
,'o' | ||
,'Numbered List' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_ul' | ||
,'UL' | ||
,' * ' | ||
,'\n' | ||
,'l' | ||
,'Bulleted List' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_p' | ||
,'P' | ||
,'p' | ||
,'\n' | ||
,'p' | ||
,'Paragraph' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_h1' | ||
,'h1' | ||
,'h1' | ||
,'\n' | ||
,'1' | ||
,'Header 1' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_h2' | ||
,'h2' | ||
,'h2' | ||
,'\n' | ||
,'2' | ||
,'Header 2' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_h3' | ||
,'h3' | ||
,'h3' | ||
,'\n' | ||
,'3' | ||
,'Header 3' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_h4' | ||
,'h4' | ||
,'h4' | ||
,'\n' | ||
,'4' | ||
,'Header 4' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_block' | ||
,'b-quote' | ||
,'bq' | ||
,'\n' | ||
,'q' | ||
,'Blockquote' | ||
); | ||
|
||
|
||
theButtons[theButtons.length] = new edButton('ed_outdent' | ||
,'OUT' | ||
,')' | ||
,'\n' | ||
,'' | ||
,'Outdent' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_indent' | ||
,'IN' | ||
,'(' | ||
,'\n' | ||
,'' | ||
,'Indent' | ||
); | ||
|
||
|
||
theButtons[theButtons.length] = new edButton('ed_justifyl' | ||
,'JL' | ||
,'<' | ||
,'' | ||
,'' | ||
,'Left Justify' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_justifyc' | ||
,'JC' | ||
,'=' | ||
,'' | ||
,'' | ||
,'Center Text' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_justifyr' | ||
,'JR' | ||
,'>' | ||
,'' | ||
,'' | ||
,'Right Justify' | ||
); | ||
|
||
theButtons[theButtons.length] = new edButton('ed_justify' | ||
,'J' | ||
,'<>' | ||
,'' | ||
,'' | ||
,'Justify' | ||
); | ||
|
||
|
||
/*theButtons[theButtons.length] = new edButton('ed_code' | ||
,'code' | ||
,'@' | ||
,'@' | ||
,'c' | ||
); | ||
theButtons[theButtons.length] = new edButton('ed_close' | ||
,'Close Tags' | ||
,'' | ||
,'' | ||
,'t' | ||
,'Close All Tags (doesnt work)' | ||
);*/ // special case |
Oops, something went wrong.