Permalink
Browse files

Initial import (WIP)

git-svn-id: http://svn.webtest.wvu.edu/repos/rails/plugins/textile_editor@56 6731b596-9f2e-9c42-8d5b-c76208a4698c
  • Loading branch information...
1 parent 7533806 commit 749195ce3915ff49651575cdb21a5d24f78b5486 cbscharf committed Mar 20, 2007
View
4 README
@@ -0,0 +1,4 @@
+TextileEditor
+=============
+
+Description goes here
View
@@ -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.
@@ -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.

0 comments on commit 749195c

Please sign in to comment.