rtextile 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.project +26 -0
- data/Gemfile +7 -0
- data/LICENSE +20 -0
- data/README.textile +44 -0
- data/Rakefile +8 -0
- data/lib/rails/generators/rtextile/USAGE +18 -0
- data/lib/rails/generators/rtextile/rtextile_generator.rb +80 -0
- data/lib/rails/generators/rtextile/templates/_form.html.erb +12 -0
- data/lib/rails/generators/rtextile/templates/_show.html.erb +3 -0
- data/lib/rails/generators/rtextile/templates/controller.rb +64 -0
- data/lib/rails/generators/rtextile/templates/edit.html.erb +10 -0
- data/lib/rails/generators/rtextile/templates/index.html.erb +8 -0
- data/lib/rails/generators/rtextile/templates/migration.rb +9 -0
- data/lib/rails/generators/rtextile/templates/model.rb +4 -0
- data/lib/rails/generators/rtextile/templates/new.html.erb +3 -0
- data/lib/rails/generators/rtextile/templates/schema.rb +14 -0
- data/lib/rails/generators/rtextile/templates/show.html.erb +8 -0
- data/lib/rails/generators/textile_editor_helper/USAGE +23 -0
- data/lib/rails/generators/textile_editor_helper/templates/background.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/blockquote.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/bold.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/center.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/h1.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/h2.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/h3.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/h4.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/h5.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/h6.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/indent.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/italic.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/justify.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/left.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/list_bullets.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/list_numbers.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/omega.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/outdent.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/paragraph.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/right.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/strikethrough.png +0 -0
- data/lib/rails/generators/textile_editor_helper/templates/textile-editor-config.js +22 -0
- data/lib/rails/generators/textile_editor_helper/templates/textile-editor.css +53 -0
- data/lib/rails/generators/textile_editor_helper/templates/textile-editor.js +676 -0
- data/lib/rails/generators/textile_editor_helper/templates/underline.png +0 -0
- data/lib/rails/generators/textile_editor_helper/textile_editor_helper_generator.rb +39 -0
- data/lib/rtextile/version.rb +3 -0
- data/lib/rtextile.rb +3 -0
- data/lib/textile_editor_helper.rb +185 -0
- data/rtextile.gemspec +22 -0
- metadata +126 -0
data/.project
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<projectDescription>
|
3
|
+
<name>rtextile</name>
|
4
|
+
<comment></comment>
|
5
|
+
<projects>
|
6
|
+
</projects>
|
7
|
+
<buildSpec>
|
8
|
+
<buildCommand>
|
9
|
+
<name>org.rubypeople.rdt.core.rubybuilder</name>
|
10
|
+
<arguments>
|
11
|
+
</arguments>
|
12
|
+
</buildCommand>
|
13
|
+
<buildCommand>
|
14
|
+
<name>com.aptana.ide.core.unifiedBuilder</name>
|
15
|
+
<arguments>
|
16
|
+
</arguments>
|
17
|
+
</buildCommand>
|
18
|
+
</buildSpec>
|
19
|
+
<natures>
|
20
|
+
<nature>com.aptana.projects.webnature</nature>
|
21
|
+
<nature>com.aptana.ide.project.nature.web</nature>
|
22
|
+
<nature>com.aptana.ruby.core.rubynature</nature>
|
23
|
+
<nature>org.rubypeople.rdt.core.rubynature</nature>
|
24
|
+
<nature>org.radrails.rails.core.railsnature</nature>
|
25
|
+
</natures>
|
26
|
+
</projectDescription>
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Thor Johnson
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.textile
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
h2. Rtextile
|
2
|
+
|
3
|
+
bq. Homepage: "Github":https://github.com/XFinger/rtextile
|
4
|
+
Author: Thor Johnson
|
5
|
+
Copyright: ©2011 Central Cortex
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
p. The rtextile gem creates a Rails 3 textile editor, enabling your users to add safe, rich text markup to your website.
|
10
|
+
|
11
|
+
p. Rtextile uses the RedCloth gem and a _gemified_ version of the textile_editor_helper plugin. It contains
|
12
|
+
two generators, *rtextile* and *textile_editor_helper* that create all the files you need to get up and running
|
13
|
+
quickly and easily.
|
14
|
+
|
15
|
+
h4. rtextile generator:
|
16
|
+
|
17
|
+
p. Generates scaffold. Files created: migration, controller, model, view templates and routes.
|
18
|
+
|
19
|
+
h4. Usage:
|
20
|
+
|
21
|
+
p. The generator takes three arguments, name(model), the objects title and the object itself.
|
22
|
+
|
23
|
+
bq. Example:
|
24
|
+
rails generate rtextile document title post
|
25
|
+
This will generate a migration for model(document) with title(string) and post(text), controller, model, view templates and routes. After running the generator, run your migration and run the textile_editor_helper generator:
|
26
|
+
|
27
|
+
h4. textile_editor_helper generator:
|
28
|
+
|
29
|
+
p. The textile_editor_helper generator is a gemified version of the plugin by the same name. Credit goes to the original authors: Dave Olsen (Javascript) and Chris Scharf (Ruby/Rails) of West Virginia University Web Services (http://webservices.wvu.edu/) and to ryanfelton (https://github.com/ryanfelton/textile-editor-helper) for making the plugin rails 3 compatable.
|
30
|
+
|
31
|
+
p. *Notice:* The textile_editor_helper requires prototype. If you prefer to use jquery, edit the initialization line in the form partial to:
|
32
|
+
|
33
|
+
pre. <%= textile_editor_initialize(:framework => :jQuery) %>
|
34
|
+
|
35
|
+
bq. Example:
|
36
|
+
rails generate textile_editor_helper
|
37
|
+
This will create: Javascripts, css and image files.
|
38
|
+
|
39
|
+
h4. Links
|
40
|
+
|
41
|
+
p(. "redcloth.org":http://redcloth.org
|
42
|
+
"textile_editor_helper (original)":http://slatecms.wvu.edu/open_source
|
43
|
+
"textile_editor_helper (upadated for rails 3)":https://github.com/ryanfelton/textile-editor-helper
|
44
|
+
"more info on textile":http://www.textism.com/tools/textile/
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
Description:
|
2
|
+
Generates scaffold to create a rails 3 textile editor. Files created: migration,
|
3
|
+
controller, model, view templates and routes.
|
4
|
+
|
5
|
+
I have gemified the plugin textile_editor_helper and included the necessary files
|
6
|
+
(updated for rails 3) in another generator called textile_editor_helper.
|
7
|
+
For more info, run rails g textile_editor_helper --help
|
8
|
+
|
9
|
+
|
10
|
+
Usage:
|
11
|
+
The generator takes three arguments, name(model), the objects title and the object itself.
|
12
|
+
Example:
|
13
|
+
rails g rtextile document title post
|
14
|
+
This will generate a migration for model(document) with title(string) and post(text) and
|
15
|
+
all of the associated files. After running the generator, run your migration and
|
16
|
+
run the textile_editor_helper generator:
|
17
|
+
rails g textile_editor_helper
|
18
|
+
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
require 'rails/generators/migration'
|
3
|
+
|
4
|
+
class RtextileGenerator < Rails::Generators::NamedBase
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
argument :title, :type => :string, :required => true, :banner => "model:title"
|
7
|
+
argument :doc, :type => :string, :required => true, :banner => "model:doc"
|
8
|
+
include Rails::Generators::Migration
|
9
|
+
|
10
|
+
|
11
|
+
def self.next_migration_number(dirname) #:nodoc:
|
12
|
+
if ActiveRecord::Base.timestamped_migrations
|
13
|
+
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
14
|
+
else
|
15
|
+
"%.3d" % (current_migration_number(dirname) + 1)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
# Every method that is declared below will be automatically executed when the generator is run
|
19
|
+
|
20
|
+
def create_migration_file
|
21
|
+
f = File.open File.join(File.dirname(__FILE__), 'templates', 'schema.rb')
|
22
|
+
schema = f.read; f.close
|
23
|
+
|
24
|
+
schema.gsub!(/ActiveRecord::Schema.*\n/, '')
|
25
|
+
schema.gsub!(/^end\n*$/, '')
|
26
|
+
|
27
|
+
f = File.open File.join(File.dirname(__FILE__), 'templates', 'migration.rb')
|
28
|
+
migration = f.read; f.close
|
29
|
+
migration.gsub!(/SCHEMA_AUTO_INSERTED_HERE/, schema)
|
30
|
+
|
31
|
+
tmp = File.open "tmp/~migration_ready.rb", "w"
|
32
|
+
tmp.write migration
|
33
|
+
tmp.close
|
34
|
+
|
35
|
+
migration_template '../../../tmp/~migration_ready.rb',
|
36
|
+
"db/migrate/create_#{plural_name}.rb "
|
37
|
+
remove_file 'tmp/~migration_ready.rb'
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
def add_route
|
42
|
+
route "resources #{plural_name.to_sym.inspect}"
|
43
|
+
route "match 'download' => '#{plural_name}#download', :as => :download"
|
44
|
+
route "match 'download_html' => '#{plural_name}#download_html', :as => :download_html"
|
45
|
+
end
|
46
|
+
|
47
|
+
def create_helper_file
|
48
|
+
create_file "app/helpers/#{plural_name}_helper.rb", <<-FILE
|
49
|
+
module #{plural_class_name}Helper
|
50
|
+
|
51
|
+
end
|
52
|
+
FILE
|
53
|
+
end
|
54
|
+
|
55
|
+
def copy_templates
|
56
|
+
template "show.html.erb", "app/views/#{plural_name}/show.html.erb"
|
57
|
+
template "_show.html.erb", "app/views/#{plural_name}/_show.html.erb"
|
58
|
+
template "_form.html.erb", "app/views/#{plural_name}/_form.html.erb"
|
59
|
+
template "edit.html.erb", "app/views/#{plural_name}/edit.html.erb"
|
60
|
+
template "index.html.erb", "app/views/#{plural_name}/index.html.erb"
|
61
|
+
template "new.html.erb", "app/views/#{plural_name}/new.html.erb"
|
62
|
+
template "model.rb", "app/models/#{name}.rb "
|
63
|
+
template "controller.rb", "app/controllers/#{plural_name}_controller.rb"
|
64
|
+
|
65
|
+
end
|
66
|
+
|
67
|
+
def add_RC # add require RedCloth to application_controller
|
68
|
+
line = "class ApplicationController < ActionController::Base"
|
69
|
+
gsub_file 'app/controllers/application_controller.rb', /(#{Regexp.escape(line)})/mi do |match|
|
70
|
+
"#{match}\n require 'RedCloth'\n"
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def class_name
|
75
|
+
name.camelize
|
76
|
+
end
|
77
|
+
def plural_class_name
|
78
|
+
plural_name.camelize
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%%= form_for @<%= name %> do |f| %>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
<%%= f.label :<%= title %> %><br />
|
5
|
+
<%%= f.text_field :<%= title %> %>
|
6
|
+
</p>
|
7
|
+
<p>
|
8
|
+
<%%= textile_editor <%= name.to_sym.inspect%>,<%= doc.to_sym.inspect%> %>
|
9
|
+
</p>
|
10
|
+
<%%= textile_editor_initialize %>
|
11
|
+
<p><%%= f.submit %></p>
|
12
|
+
<%% end %>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
|
2
|
+
class <%= plural_class_name%>Controller < ApplicationController
|
3
|
+
|
4
|
+
def download
|
5
|
+
file_content = []
|
6
|
+
<%= name %> = <%= class_name %>.find(params[:id])
|
7
|
+
@<%= doc %> = <%= name %>.<%= doc %>
|
8
|
+
@<%= title %> = <%= name %>.<%= title %>.to_s
|
9
|
+
file_name = (@<%= title %>+".textile")
|
10
|
+
send_data(@<%= doc %>, :filename => file_name, :type => "text/textile")
|
11
|
+
end
|
12
|
+
|
13
|
+
def download_html
|
14
|
+
<%= name %> = <%= class_name %>.find(params[:id])
|
15
|
+
@<%= doc %> = RedCloth.new(<%= name %>.<%= doc %>).to_html
|
16
|
+
@<%= title %> = <%= name %>.<%= title %>.to_s
|
17
|
+
file_name = (@<%= title %>+".html")
|
18
|
+
send_data(@<%= doc %>, :filename => file_name, :type => "text/html")
|
19
|
+
end
|
20
|
+
|
21
|
+
def index
|
22
|
+
@<%= plural_name %> = <%= class_name %>.all
|
23
|
+
end
|
24
|
+
|
25
|
+
def show
|
26
|
+
@<%= name %> = <%= class_name %>.find(params[:id])
|
27
|
+
end
|
28
|
+
|
29
|
+
def new
|
30
|
+
@<%= name %> = <%= class_name %>.new
|
31
|
+
end
|
32
|
+
|
33
|
+
def create
|
34
|
+
@<%= name %> = <%= class_name %>.new(params[:<%= name %>])
|
35
|
+
if @<%= name %>.save
|
36
|
+
flash[:notice] = "Successfully created <%= name %>."
|
37
|
+
render :action => "edit"
|
38
|
+
else
|
39
|
+
render :action => 'new'
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def edit
|
44
|
+
@<%= name %> = <%= class_name %>.find(params[:id])
|
45
|
+
end
|
46
|
+
|
47
|
+
def update
|
48
|
+
@<%= name %> = <%= class_name %>.find(params[:id])
|
49
|
+
if @<%= name %>.update_attributes(params[:<%= name %>])
|
50
|
+
flash[:notice] = "Successfully updated <%= name %>."
|
51
|
+
render :action => "edit"
|
52
|
+
else
|
53
|
+
render :action => 'edit'
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def destroy
|
58
|
+
@<%= name %> = <%= class_name %>.find(params[:id])
|
59
|
+
@<%= name %>.destroy
|
60
|
+
flash[:notice] = "Successfully destroyed <%= name %>."
|
61
|
+
redirect_to <%= plural_name %>_url
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%%= render :partial => 'form' %>
|
2
|
+
<hr>
|
3
|
+
<%%= render :partial => 'show'%>
|
4
|
+
<hr>
|
5
|
+
<p>
|
6
|
+
<%%= link_to "Show", @<%= name %> %> |
|
7
|
+
<%%= link_to "View All", <%= name.pluralize %>_path %> |
|
8
|
+
<%%= link_to "Download "+@<%= name%>.<%= title %>+".textile " ,:action => :download, :id => @<%= name %>.id %> |
|
9
|
+
<%%= link_to "Download "+@<%= name%>.<%= title %>+".html" ,:action => :download_html, :id => @<%= name %>.id %>
|
10
|
+
</p>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
ActiveRecord::Schema.define(:version => 0) do
|
2
|
+
|
3
|
+
create_table :<%= plural_name %> do |t|
|
4
|
+
t.string :<%= title %>
|
5
|
+
t.text :<%= doc %>
|
6
|
+
t.datetime :created_at
|
7
|
+
t.datetime :updated_at
|
8
|
+
end
|
9
|
+
|
10
|
+
add_index :<%= plural_name %>, [:<%= title %>]
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%%= render :partial => 'show'%>
|
2
|
+
<p>
|
3
|
+
<%%= link_to "Download "+@<%= name%>.<%= title %>+".textile " ,:action => :download, :id => @<%= name %>.id %> |
|
4
|
+
<%%= link_to "Download "+@<%= name%>.<%= title %>+".html" ,:action => :download_html, :id => @<%= name %>.id %>
|
5
|
+
<%%= link_to "Edit", edit_<%= name %>_path(@<%= name%>) %> |
|
6
|
+
<%%= link_to "Destroy", @<%= name %>, :confirm => 'Are you sure?', :method => :delete %> |
|
7
|
+
<%%= link_to "View All", <%= name.pluralize %>_path %>
|
8
|
+
</p>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
Description:
|
3
|
+
The textile_editor_helper generator is a gemified version of the plugin by the same name. Credit goes to
|
4
|
+
the original authors: Dave Olsen (Javascript) and Chris Scharf (Ruby/Rails) of West Virginia University
|
5
|
+
Web Services (http://webservices.wvu.edu/) and to ryanfelton (https://github.com/ryanfelton/textile-editor-helper)
|
6
|
+
for making the plugin rails 3 compatable.
|
7
|
+
|
8
|
+
Another genereator, rtextile is packaged in this gem. It creates a migration and scaffold for your textile
|
9
|
+
editor. For more info on rtextile generator, run rails g rtextile --help.
|
10
|
+
|
11
|
+
Notice: The textile_editor_helper requires prototype. If you prefer to use jquery, edit the initialization
|
12
|
+
line in the form partial to look like this: <%= textile_editor_initialize(:framework => :jQuery) %>
|
13
|
+
|
14
|
+
Example:
|
15
|
+
rails generate textile_editor_helper
|
16
|
+
|
17
|
+
This will create:
|
18
|
+
Javascripts, css and image files.
|
19
|
+
|
20
|
+
More info on textile_editor_helper can be found here:http://slatecms.wvu.edu/open_source/textile_editor_helper
|
21
|
+
or here: https://github.com/ryanfelton/textile-editor-helper.
|
22
|
+
|
23
|
+
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,22 @@
|
|
1
|
+
var teButtons = TextileEditor.buttons;
|
2
|
+
|
3
|
+
teButtons.push(new TextileEditorButton('ed_strong', 'bold.png', '*', '*', 'b', 'Bold','s'));
|
4
|
+
teButtons.push(new TextileEditorButton('ed_emphasis', 'italic.png', '_', '_', 'i', 'Italicize','s'));
|
5
|
+
teButtons.push(new TextileEditorButton('ed_underline', 'underline.png', '+', '+', 'u', 'Underline','s'));
|
6
|
+
teButtons.push(new TextileEditorButton('ed_strike', 'strikethrough.png', '-', '-', 's', 'Strikethrough','s'));
|
7
|
+
teButtons.push(new TextileEditorButton('ed_ol', 'list_numbers.png', ' # ', '\n', ',', 'Numbered List'));
|
8
|
+
teButtons.push(new TextileEditorButton('ed_ul', 'list_bullets.png', ' * ', '\n', '.', 'Bulleted List'));
|
9
|
+
teButtons.push(new TextileEditorButton('ed_p', 'paragraph.png', 'p', '\n', 'p', 'Paragraph'));
|
10
|
+
teButtons.push(new TextileEditorButton('ed_h1', 'h1.png', 'h1', '\n', '1', 'Header 1'));
|
11
|
+
teButtons.push(new TextileEditorButton('ed_h2', 'h2.png', 'h2', '\n', '2', 'Header 2'));
|
12
|
+
teButtons.push(new TextileEditorButton('ed_h3', 'h3.png', 'h3', '\n', '3', 'Header 3'));
|
13
|
+
teButtons.push(new TextileEditorButton('ed_h4', 'h4.png', 'h4', '\n', '4', 'Header 4'));
|
14
|
+
teButtons.push(new TextileEditorButton('ed_block', 'blockquote.png', 'bq', '\n', 'q', 'Blockquote'));
|
15
|
+
teButtons.push(new TextileEditorButton('ed_outdent', 'outdent.png', ')', '\n', ']', 'Outdent'));
|
16
|
+
teButtons.push(new TextileEditorButton('ed_indent', 'indent.png', '(', '\n', '[', 'Indent'));
|
17
|
+
teButtons.push(new TextileEditorButton('ed_justifyl', 'left.png', '<', '\n', 'l', 'Left Justify'));
|
18
|
+
teButtons.push(new TextileEditorButton('ed_justifyc', 'center.png', '=', '\n', 'e', 'Center Text'));
|
19
|
+
teButtons.push(new TextileEditorButton('ed_justifyr', 'right.png', '>', '\n', 'r', 'Right Justify'));
|
20
|
+
teButtons.push(new TextileEditorButton('ed_justify', 'justify.png', '<>', '\n', 'j', 'Justify'));
|
21
|
+
|
22
|
+
// teButtons.push(new TextileEditorButton('ed_code','code','@','@','c','Code'));
|
@@ -0,0 +1,53 @@
|
|
1
|
+
div.textile-toolbar span.ed_sep {
|
2
|
+
xposition: relative;
|
3
|
+
xtop: -4px;
|
4
|
+
padding: 0;
|
5
|
+
height: 6px;
|
6
|
+
width: 2px;
|
7
|
+
margin: 0 2px;
|
8
|
+
border-left: solid 1px #d5d5d5;
|
9
|
+
border-right: solid 1px #f5f5f5;
|
10
|
+
}
|
11
|
+
|
12
|
+
div.textile-toolbar button {
|
13
|
+
margin: 0;
|
14
|
+
background-color: #f0f0ee;
|
15
|
+
background-repeat: no-repeat;
|
16
|
+
border: 1px solid #f0f0ee;
|
17
|
+
padding: 2px 0;
|
18
|
+
}
|
19
|
+
|
20
|
+
div.textile-toolbar button.standard {
|
21
|
+
text-align: center;
|
22
|
+
width: 24px;
|
23
|
+
}
|
24
|
+
|
25
|
+
div.textile-toolbar button img {
|
26
|
+
vertical-align: text-bottom;
|
27
|
+
}
|
28
|
+
|
29
|
+
div.textile-toolbar button:hover,
|
30
|
+
div.textile-toolbar button.unselected:hover {
|
31
|
+
border: 1px solid #999;
|
32
|
+
}
|
33
|
+
|
34
|
+
div.textile-toolbar button.selected {
|
35
|
+
border: 1px solid #ce9100;
|
36
|
+
background-color: #ffffff;
|
37
|
+
}
|
38
|
+
|
39
|
+
div.textile-toolbar button.unselected {
|
40
|
+
border: 1px solid #f0f0ee;
|
41
|
+
background-color: #f0f0ee;
|
42
|
+
}
|
43
|
+
|
44
|
+
div.textile-toolbar button.publish {
|
45
|
+
padding:5px;
|
46
|
+
display:block;
|
47
|
+
}
|
48
|
+
|
49
|
+
div.textile-toolbar {
|
50
|
+
background-color: #f0f0ee;
|
51
|
+
padding: 3px;
|
52
|
+
margin-bottom: 4px;
|
53
|
+
}
|