Skip to content
This repository has been archived by the owner on Mar 20, 2018. It is now read-only.

Commit

Permalink
added 'view raw html' button to rich text editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Mykola Kurutin committed Jul 12, 2012
1 parent 6fc6893 commit 598c1a3
Show file tree
Hide file tree
Showing 4 changed files with 616 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -28,7 +28,7 @@ end
gem "haml"
gem 'jquery-rails'
gem 'simple_form'
gem 'bootstrap-wysihtml5-rails'
gem 'bootstrap-wysihtml5-rails', github: "mkurutin/bootstrap-wysihtml5-rails"
gem "browser"

# To use ActiveModel has_secure_password
Expand Down
98 changes: 51 additions & 47 deletions Gemfile.lock
@@ -1,14 +1,21 @@
GIT
remote: git://github.com/mkurutin/bootstrap-wysihtml5-rails.git
revision: 6dbcb496e6243fa99cd1da6c9a3316fe821d2458
specs:
bootstrap-wysihtml5-rails (0.2.12)
railties (>= 3.0)

GIT
remote: git://github.com/rweng/jquery-datatables-rails.git
revision: 9e88f3c3a858a29492adb710e4801b8f19205ead
revision: 535d355c85d3a79984cfe310b22aeb9ca05252e6
specs:
jquery-datatables-rails (1.9.1.3)
jquery-datatables-rails (1.10.0)
jquery-rails

GEM
remote: https://rubygems.org/
specs:
ZenTest (4.8.0)
ZenTest (4.8.1)
actionmailer (3.2.3)
actionpack (= 3.2.3)
mail (~> 2.4.4)
Expand Down Expand Up @@ -37,10 +44,10 @@ GEM
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.2.8)
airbrake (3.1.1)
airbrake (3.1.2)
activesupport
builder
anjlab-bootstrap-rails (2.0.3.2)
anjlab-bootstrap-rails (2.0.4.3)
railties (>= 3.0)
sass
arel (3.0.2)
Expand All @@ -52,30 +59,28 @@ GEM
mime-types
xml-simple
bcrypt-ruby (3.0.1)
bootstrap-wysihtml5-rails (0.2.9)
railties (>= 3.0)
browser (0.1.3)
browser (0.1.4)
builder (3.0.0)
childprocess (0.3.2)
childprocess (0.3.3)
ffi (~> 1.0.6)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.3.2)
coffee-script-source (1.3.3)
crack (0.3.1)
diff-lcs (1.1.3)
distribution (0.7.0)
dkim (0.2.0)
erubis (2.7.0)
execjs (1.3.2)
execjs (1.4.0)
multi_json (~> 1.0)
factory_girl (3.3.0)
factory_girl (3.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (3.3.0)
factory_girl (~> 3.3.0)
factory_girl_rails (3.5.0)
factory_girl (~> 3.5.0)
railties (>= 3.0.0)
faker (1.0.1)
i18n (~> 0.4)
Expand All @@ -87,15 +92,15 @@ GEM
garb (0.9.1)
activesupport (>= 2.2.0)
crack (>= 0.1.6)
haml (3.1.5)
haml (3.1.6)
hike (1.2.1)
hirb (0.6.2)
hirb (0.7.0)
i18n (0.6.0)
journey (1.0.3)
journey (1.0.4)
jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
jquery-ui-rails (0.4.0)
jquery-ui-rails (1.0.0)
jquery-rails
railties (>= 3.1.0)
jslint_on_rails (1.1.1)
Expand All @@ -111,14 +116,14 @@ GEM
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.18)
multi_json (1.3.5)
mime-types (1.19)
multi_json (1.3.6)
mysql (2.8.1)
mysql2 (0.3.11)
newrelic_rpm (3.3.4.1)
nokogiri (1.5.2)
newrelic_rpm (3.4.0.1)
nokogiri (1.5.5)
oauth (0.4.6)
pg (0.13.2)
pg (0.14.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
Expand All @@ -135,7 +140,7 @@ GEM
activesupport (= 3.2.3)
bundler (~> 1.0)
railties (= 3.2.3)
rails_config (0.3.0)
rails_config (0.3.1)
activesupport (>= 3.0)
railties (3.2.3)
actionpack (= 3.2.3)
Expand All @@ -144,52 +149,51 @@ GEM
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
raindrops (0.8.1)
raindrops (0.10.0)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
redis (2.2.2)
redis (3.0.1)
redis-actionpack (3.2.3)
actionpack (~> 3.2.3)
redis-rack (~> 1.4.0)
redis-store (~> 1.1.0)
redis-activesupport (3.2.3)
activesupport (~> 3.2.3)
redis-store (~> 1.1.0)
redis-rack (1.4.1)
rack (= 1.4.1)
redis-rack (1.4.2)
rack (~> 1.4.1)
redis-store (~> 1.1.0)
redis-rails (3.2.3)
redis-actionpack (~> 3.2.3)
redis-activesupport (~> 3.2.3)
redis-store (~> 1.1.0)
redis-store (1.1.0)
redis (~> 2.2.0)
rinku (1.5.1)
rspec (2.10.0)
rspec-core (~> 2.10.0)
rspec-expectations (~> 2.10.0)
rspec-mocks (~> 2.10.0)
rspec-core (2.10.0)
rspec-expectations (2.10.0)
redis-store (1.1.1)
redis (>= 2.2.0)
rinku (1.7.0)
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
rspec-mocks (~> 2.11.0)
rspec-core (2.11.0)
rspec-expectations (2.11.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.10.1)
rspec-rails (2.10.1)
rspec-mocks (2.11.1)
rspec-rails (2.11.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.10.0)
rubyzip (0.9.8)
rspec (~> 2.11.0)
rubyzip (0.9.9)
sanitize (2.0.3)
nokogiri (>= 1.4.4, < 1.6)
sass (3.1.18)
sass (3.1.20)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
selenium-webdriver (2.21.2)
selenium-webdriver (2.24.0)
childprocess (>= 0.2.5)
ffi (~> 1.0)
libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
Expand All @@ -211,9 +215,9 @@ GEM
polyglot (>= 0.3.1)
truncate_html (0.5.5)
tzinfo (0.3.33)
uglifier (1.2.4)
uglifier (1.2.6)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
multi_json (~> 1.3)
unicorn (4.3.1)
kgio (~> 2.6)
rack
Expand All @@ -229,7 +233,7 @@ DEPENDENCIES
autotest
aws-ses (~> 0.4.4)
bcrypt-ruby (~> 3.0.0)
bootstrap-wysihtml5-rails
bootstrap-wysihtml5-rails!
browser
coffee-rails (~> 3.2.1)
distribution
Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/petition.js
Expand Up @@ -109,7 +109,7 @@ function initTabIndexes() {
}

function applyRichTextEditorTo(item) {
$(item).wysihtml5();
$(item).wysihtml5({"html": true, parserRules: wysihtml5ParserRules});
}

function preventWhitespaceOn(input) {
Expand Down Expand Up @@ -204,4 +204,4 @@ $(document).ready(function () {
$('#facebook_title').show();
$('#facebook_title_link').hide();
});
});
});

0 comments on commit 598c1a3

Please sign in to comment.