activeadmin_medium_editor 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +3 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +20 -0
  5. data/README.md +48 -0
  6. data/Rakefile +3 -0
  7. data/activeadmin_medium_editor.gemspec +19 -0
  8. data/app/assets/javascripts/activeadmin/medium_editor/medium_editor.js +7885 -0
  9. data/app/assets/javascripts/activeadmin/medium_editor/medium_editor.min.js +4 -0
  10. data/app/assets/javascripts/activeadmin/medium_editor_input.js +8 -0
  11. data/app/assets/stylesheets/activeadmin/_medium_editor_input.sass +29 -0
  12. data/app/assets/stylesheets/activeadmin/medium_editor/medium_editor.css +230 -0
  13. data/app/assets/stylesheets/activeadmin/medium_editor/medium_editor.min.css +1 -0
  14. data/app/assets/stylesheets/activeadmin/medium_editor/themes/beagle.css +78 -0
  15. data/app/assets/stylesheets/activeadmin/medium_editor/themes/beagle.min.css +1 -0
  16. data/app/assets/stylesheets/activeadmin/medium_editor/themes/bootstrap.css +67 -0
  17. data/app/assets/stylesheets/activeadmin/medium_editor/themes/bootstrap.min.css +1 -0
  18. data/app/assets/stylesheets/activeadmin/medium_editor/themes/default.css +63 -0
  19. data/app/assets/stylesheets/activeadmin/medium_editor/themes/default.min.css +1 -0
  20. data/app/assets/stylesheets/activeadmin/medium_editor/themes/flat.css +58 -0
  21. data/app/assets/stylesheets/activeadmin/medium_editor/themes/flat.min.css +1 -0
  22. data/app/assets/stylesheets/activeadmin/medium_editor/themes/mani.css +57 -0
  23. data/app/assets/stylesheets/activeadmin/medium_editor/themes/mani.min.css +1 -0
  24. data/app/assets/stylesheets/activeadmin/medium_editor/themes/roman.css +58 -0
  25. data/app/assets/stylesheets/activeadmin/medium_editor/themes/roman.min.css +1 -0
  26. data/app/assets/stylesheets/activeadmin/medium_editor/themes/tim.css +67 -0
  27. data/app/assets/stylesheets/activeadmin/medium_editor/themes/tim.min.css +1 -0
  28. data/lib/activeadmin/medium_editor/engine.rb +9 -0
  29. data/lib/activeadmin/medium_editor/version.rb +5 -0
  30. data/lib/activeadmin/medium_editor.rb +1 -0
  31. data/lib/activeadmin_medium_editor.rb +3 -0
  32. data/lib/formtastic/inputs/medium_editor_input.rb +9 -0
  33. metadata +88 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5fa056de5e59846b7d0b449ef371f7fe75864656
4
+ data.tar.gz: 1fe493b9241658fad0f48551149d2257913e4a54
5
+ SHA512:
6
+ metadata.gz: 8cce0810875b611906d7349c1c63d80b97979dbc82f1a60e18fff7b99ad62b945c7503aee828e5ce6057d98a6d1638f9bdb6bc594a5dc48dd4012d134000a7be
7
+ data.tar.gz: ceed18fffe69dc22003de49cf6d94aa47a314a1622d16ab8736f16f10cf989bf6a74696f3a4258b12bec65f3f7ee0f5f65911fafc33b190418e4564d086e4ef8
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ _misc/
2
+
3
+ *.orig
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2017 Mattia Roccoberton
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.md ADDED
@@ -0,0 +1,48 @@
1
+ # ActiveAdmin Medium Editor [![Gem Version](https://badge.fury.io/rb/activeadmin_medium_editor.svg)](https://badge.fury.io/rb/activeadmin_medium_editor)
2
+
3
+ An Active Admin plugin to use [medium-editor](https://github.com/yabwe/medium-editor).
4
+
5
+ ## Install
6
+
7
+ - Add to your Gemfile:
8
+ `gem 'activeadmin_medium_editor'`
9
+ - Execute bundle
10
+ - Add at the end of your ActiveAdmin styles (_app/assets/stylesheets/active_admin.scss_):
11
+ ```css
12
+ @import 'activeadmin/medium_editor_input';
13
+ @import 'activeadmin/medium_editor/themes/default'; // or another theme
14
+ ```
15
+ - Add at the end of your ActiveAdmin javascripts (_app/assets/javascripts/active_admin.js_):
16
+ ```js
17
+ //= require activeadmin/medium_editor/medium_editor
18
+ //= require activeadmin/medium_editor_input
19
+ ```
20
+ - Use the input with `as: :medium_editor` in Active Admin model conf
21
+
22
+ Why 2 separated scripts? In this way you can include a different version of *medium-editor* if you like.
23
+
24
+ ## Notes
25
+
26
+ **data-options** optional attribute permits to set *medium-editor* options directly - [options list](https://github.com/yabwe/medium-editor#mediumeditor-options)
27
+
28
+ ## Example
29
+
30
+ ```ruby
31
+ # ActiveAdmin article form conf:
32
+ form do |f|
33
+ f.inputs 'Article' do
34
+ f.input :title
35
+ f.input :description, as: :medium_editor, input_html: { 'data-options': '{"toolbar":{"buttons":["bold","italic","underline","anchor"]}}' }
36
+ f.input :published
37
+ end
38
+ f.actions
39
+ end
40
+ ```
41
+
42
+ ## Contributors
43
+
44
+ - [Mattia Roccoberton](http://blocknot.es) - creator, maintainer
45
+
46
+ ## License
47
+
48
+ [MIT](LICENSE.txt)
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ # encoding: utf-8
2
+
3
+ require "bundler/gem_tasks"
@@ -0,0 +1,19 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'activeadmin/medium_editor/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'activeadmin_medium_editor'
7
+ spec.version = ActiveAdmin::MediumEditor::VERSION
8
+ spec.summary = 'medium-editor for ActiveAdmin'
9
+ spec.description = 'An Active Admin plugin to use Medium Editor'
10
+ spec.license = 'MIT'
11
+ spec.authors = ['Mattia Roccoberton']
12
+ spec.email = 'mat@blocknot.es'
13
+ spec.homepage = 'https://github.com/blocknotes/activeadmin_medium_editor'
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.require_paths = ['lib']
17
+
18
+ spec.add_runtime_dependency 'activeadmin', '~> 1.0'
19
+ end