administrate-field-trix 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +1 -0
- data/Gemfile +3 -0
- data/LICENSE.md +15 -0
- data/README.md +30 -0
- data/administrate-field-trix.gemspec +20 -0
- data/app/assets/javascripts/administrate-field-trix/application.js +1 -0
- data/app/assets/stylesheets/administrate-field-trix/application.scss +17 -0
- data/app/views/fields/trix/_form.html.erb +6 -0
- data/app/views/fields/trix/_index.html.erb +1 -0
- data/app/views/fields/trix/_show.html.erb +1 -0
- data/lib/administrate/field/trix.rb +17 -0
- metadata +99 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 96a0071f5862ea0d2409959ac5d57706307110a68a3ac9a2b0ebaed667eff6b6
|
4
|
+
data.tar.gz: fc14bb69645e5663235515ced95ec39acea42d3fb3aebcff2df4bac6c84e57d0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 99e8c5bb7de6c81f90f4d875e2ba32582b52710e38309a47a0347784afdb252c30eedd49cdaa8c83bffa9f41d3e6ba1a7d14ed69bc4f9984d69d7827f4d26f3d
|
7
|
+
data.tar.gz: 89168d231cd848aa6bc271504ad2d8f4fe7fea1ec545fcb58740c85d48f2531605ce9dd8fb865233c8404d854388e1770d253059e1dcb06eb05162d8133bdc3b
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.gem
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Changelog
|
data/Gemfile
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
Copyright (c) 2018 AppJumpstart
|
2
|
+
|
3
|
+
Permission to use, copy, modify, and/or distribute this software for
|
4
|
+
any purpose with or without fee is hereby granted, provided that the
|
5
|
+
above copyright notice and this permission notice appear in all
|
6
|
+
copies.
|
7
|
+
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
9
|
+
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
10
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
11
|
+
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
12
|
+
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
13
|
+
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
14
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# administrate-field-trix
|
2
|
+
> A plugin to use the [Trix](https://trix-editor.org) WYSIWYG editor within in [Administrate](https://github.com/thoughtbot/administrate).
|
3
|
+
|
4
|
+
**Forked from [headwayio/administrate-field-trix](https://github.com/headwayio/administrate-field-trix)**
|
5
|
+
|
6
|
+
## Install
|
7
|
+
|
8
|
+
Add [trix-rails](https://github.com/kylefox/trix/) and `administrate-field-trix`
|
9
|
+
to your `Gemfile`:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'trix-rails', require: 'trix'
|
13
|
+
gem 'administrate-field-trix'
|
14
|
+
```
|
15
|
+
|
16
|
+
Install:
|
17
|
+
|
18
|
+
```bash
|
19
|
+
$ bundle install
|
20
|
+
```
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
Add a Trix field to `app/dashboards/foo_dashboard.rb`:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
ATTRIBUTE_TYPES = {
|
28
|
+
bar: Field::Trix
|
29
|
+
}.freeze
|
30
|
+
```
|
@@ -0,0 +1,20 @@
|
|
1
|
+
$:.push File.expand_path('../lib', __FILE__)
|
2
|
+
|
3
|
+
Gem::Specification.new do |gem|
|
4
|
+
gem.name = 'administrate-field-trix'
|
5
|
+
gem.version = '0.0.1'
|
6
|
+
gem.authors = ['Ian Walter', 'Noah Settersten']
|
7
|
+
gem.email = ['public@iankwalter.com']
|
8
|
+
gem.homepage = 'https://github.com/appjumpstart/administrate-field-trix'
|
9
|
+
gem.summary = 'A plugin to use the Trix WYSIWYG editor in Administrate'
|
10
|
+
gem.description = gem.summary
|
11
|
+
gem.license = 'ISC'
|
12
|
+
|
13
|
+
gem.require_paths = ['lib']
|
14
|
+
gem.files = `git ls-files`.split("\n")
|
15
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
|
17
|
+
gem.add_runtime_dependency 'administrate', '< 1.0.0'
|
18
|
+
gem.add_runtime_dependency 'rails', '>= 4.1'
|
19
|
+
gem.add_runtime_dependency 'trix-rails', '>= 0.11.4.1'
|
20
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require trix
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= truncate(field.to_s, length: 250) %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= sanitize(field.to_s, attributes: %w(style)) %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'administrate/field/base'
|
2
|
+
require 'rails'
|
3
|
+
|
4
|
+
module Administrate
|
5
|
+
module Field
|
6
|
+
class Trix < Administrate::Field::Base
|
7
|
+
class Engine < ::Rails::Engine
|
8
|
+
Administrate::Engine.add_javascript 'administrate-field-trix/application'
|
9
|
+
Administrate::Engine.add_stylesheet 'administrate-field-trix/application'
|
10
|
+
end
|
11
|
+
|
12
|
+
def to_s
|
13
|
+
data
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: administrate-field-trix
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ian Walter
|
8
|
+
- Noah Settersten
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2018-08-31 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: administrate
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "<"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 1.0.0
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "<"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 1.0.0
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rails
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '4.1'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '4.1'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: trix-rails
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 0.11.4.1
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 0.11.4.1
|
56
|
+
description: A plugin to use the Trix WYSIWYG editor in Administrate
|
57
|
+
email:
|
58
|
+
- public@iankwalter.com
|
59
|
+
executables: []
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- CHANGELOG.md
|
65
|
+
- Gemfile
|
66
|
+
- LICENSE.md
|
67
|
+
- README.md
|
68
|
+
- administrate-field-trix.gemspec
|
69
|
+
- app/assets/javascripts/administrate-field-trix/application.js
|
70
|
+
- app/assets/stylesheets/administrate-field-trix/application.scss
|
71
|
+
- app/views/fields/trix/_form.html.erb
|
72
|
+
- app/views/fields/trix/_index.html.erb
|
73
|
+
- app/views/fields/trix/_show.html.erb
|
74
|
+
- lib/administrate/field/trix.rb
|
75
|
+
homepage: https://github.com/appjumpstart/administrate-field-trix
|
76
|
+
licenses:
|
77
|
+
- ISC
|
78
|
+
metadata: {}
|
79
|
+
post_install_message:
|
80
|
+
rdoc_options: []
|
81
|
+
require_paths:
|
82
|
+
- lib
|
83
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
requirements: []
|
94
|
+
rubyforge_project:
|
95
|
+
rubygems_version: 2.7.6
|
96
|
+
signing_key:
|
97
|
+
specification_version: 4
|
98
|
+
summary: A plugin to use the Trix WYSIWYG editor in Administrate
|
99
|
+
test_files: []
|