activeadmin_medium_editor 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +20 -0
- data/README.md +48 -0
- data/Rakefile +3 -0
- data/activeadmin_medium_editor.gemspec +19 -0
- data/app/assets/javascripts/activeadmin/medium_editor/medium_editor.js +7885 -0
- data/app/assets/javascripts/activeadmin/medium_editor/medium_editor.min.js +4 -0
- data/app/assets/javascripts/activeadmin/medium_editor_input.js +8 -0
- data/app/assets/stylesheets/activeadmin/_medium_editor_input.sass +29 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/medium_editor.css +230 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/medium_editor.min.css +1 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/beagle.css +78 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/beagle.min.css +1 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/bootstrap.css +67 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/bootstrap.min.css +1 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/default.css +63 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/default.min.css +1 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/flat.css +58 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/flat.min.css +1 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/mani.css +57 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/mani.min.css +1 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/roman.css +58 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/roman.min.css +1 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/tim.css +67 -0
- data/app/assets/stylesheets/activeadmin/medium_editor/themes/tim.min.css +1 -0
- data/lib/activeadmin/medium_editor/engine.rb +9 -0
- data/lib/activeadmin/medium_editor/version.rb +5 -0
- data/lib/activeadmin/medium_editor.rb +1 -0
- data/lib/activeadmin_medium_editor.rb +3 -0
- data/lib/formtastic/inputs/medium_editor_input.rb +9 -0
- 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
data/Gemfile
ADDED
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,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
|