Skip to content

Commit

Permalink
Initial import (WIP)
Browse files Browse the repository at this point in the history
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
Show file tree
Hide file tree
Showing 31 changed files with 861 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README
@@ -0,0 +1,4 @@
TextileEditor
=============

Description goes here
22 changes: 22 additions & 0 deletions Rakefile
@@ -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
Binary file added assets/images/toolbar/background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/blockquote.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/bold.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/center.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/h1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/h2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/h3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/h4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/h5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/h6.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/indent.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/italic.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/justify.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/left.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/list_bullets.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/list_numbers.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/omega.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/outdent.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/paragraph.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/right.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/strikethrough.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/toolbar/underline.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
182 changes: 182 additions & 0 deletions assets/javascripts/text-tags-config.js
@@ -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

0 comments on commit 749195c

Please sign in to comment.