3 Коммитов
v0.2.0 ... aa2

Автор SHA1 Сообщение Дата
mat@blocknot.es
7eea36b07d Fix snow theme css extention missing 2018-11-09 11:30:50 +01:00
mat@blocknot.es
21806ca9b4 Support for AA 2.0.0.alpha 2018-11-03 18:38:10 +01:00
mat@blocknot.es
1f13f6c65a v0.1.4: PR4 + Quill Editor 1.3.6 2018-11-03 17:45:21 +01:00
12 изменённых файлов: 28 добавлений и 108 удалений

Просмотреть файл

@@ -1,73 +0,0 @@
require:
- rubocop-rspec
Rails:
Enabled: true
AllCops:
TargetRubyVersion: 2.3.8
TargetRailsVersion: 5.2
Exclude:
- db/schema.rb
- bin/*
- node_modules/**/*
# Temporary files
- tmp/**/*
Rails/InverseOf:
Enabled: false
Style/Documentation:
Enabled: false
Metrics/ClassLength:
# Default value is 100
Max: 150
Metrics/LineLength:
# Default is 80
Max: 120
Metrics/ModuleLength:
# Default is 100
Max: 150
Metrics/ParameterLists:
# Default is 5
Max: 6
RSpec/ExampleLength:
# Default is 10
Max: 20
Style/FrozenStringLiteralComment:
# Deface DOES edit strings in place
Exclude:
- 'app/overrides/**/*'
RSpec/MultipleExpectations:
# Default is 3
Max: 5
RSpec/NestedGroups:
# Default is 3
Max: 6
Metrics/AbcSize:
Max: 25
Metrics/BlockLength:
# This value double the rubocop default
Max: 50
Metrics/CyclomaticComplexity:
# This value double the rubocop default
Max: 12
Metrics/MethodLength:
# This value double the rubocop default
Max: 20
Metrics/PerceivedComplexity:
# Default is 7
Max: 10

Просмотреть файл

@@ -1,3 +1,4 @@
source 'https://rubygems.org' source 'https://rubygems.org'
gemspec gemspec

Просмотреть файл

@@ -22,7 +22,7 @@ Why 2 separated scripts? In this way you can include a different version of *qui
## Options ## Options
**data-options**: permits to set *quill editor* options directly - see [options list](https://quilljs.com/docs/configuration/) **data-options**: permits to set *quill editor* options directly - see [options list](https://quilljs.com/docs/quickstart/)
## Examples ## Examples

Просмотреть файл

@@ -1,3 +1,3 @@
# frozen_string_literal: true # encoding: utf-8
require 'bundler/gem_tasks' require "bundler/gem_tasks"

Просмотреть файл

@@ -1,6 +1,4 @@
# frozen_string_literal: true lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'activeadmin/quill_editor/version' require 'activeadmin/quill_editor/version'
@@ -17,5 +15,5 @@ Gem::Specification.new do |spec|
spec.files = `git ls-files -z`.split("\x0") spec.files = `git ls-files -z`.split("\x0")
spec.require_paths = ['lib'] spec.require_paths = ['lib']
spec.add_runtime_dependency 'activeadmin', '>= 1.0' spec.add_runtime_dependency 'activeadmin', '2.0.0.alpha' # '~> 1.0'
end end

Просмотреть файл

@@ -17,6 +17,8 @@ var initQuillEditors = function() {
[{ 'align': [] }, { list: 'ordered' }, { list: 'bullet' }], [{ 'align': [] }, { list: 'ordered' }, { list: 'bullet' }],
[{ 'color': [] }, { 'background': [] }], [{ 'color': [] }, { 'background': [] }],
['clean'], ['clean'],
// [{ 'size': ['small', false, 'large', 'huge'] }],
// [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
] ]
}, },
placeholder: '', placeholder: '',
@@ -39,6 +41,8 @@ var initQuillEditors = function() {
for( var i = 0; i < editors.length; i++ ) { for( var i = 0; i < editors.length; i++ ) {
var input = editors[i].querySelector( 'input[type="hidden"]' ); var input = editors[i].querySelector( 'input[type="hidden"]' );
input.value = editors[i]['_quill-editor'].root.innerHTML; input.value = editors[i]['_quill-editor'].root.innerHTML;
// input.value = editors[i]['_quill-editor'].getContents();
// input.value = editors[i].querySelector( '.quill-editor-content' ).innerHTML;
} }
}; };
} }

Просмотреть файл

@@ -1,4 +1,4 @@
@import 'activeadmin/quill_editor/quill.snow' @import 'activeadmin/quill_editor/quill.snow.css'
body.active_admin form .quill-editor body.active_admin form .quill-editor
display: inline-block display: inline-block

Просмотреть файл

@@ -1,3 +1 @@
# frozen_string_literal: true
require 'activeadmin/quill_editor/engine' require 'activeadmin/quill_editor/engine'

Просмотреть файл

@@ -1,5 +1,3 @@
# frozen_string_literal: true
require 'active_admin' require 'active_admin'
module ActiveAdmin module ActiveAdmin

Просмотреть файл

@@ -1,7 +1,5 @@
# frozen_string_literal: true
module ActiveAdmin module ActiveAdmin
module QuillEditor module QuillEditor
VERSION = '0.2.0' VERSION = '0.1.4'
end end
end end

Просмотреть файл

@@ -1,5 +1,3 @@
# frozen_string_literal: true
require 'activeadmin/quill_editor' require 'activeadmin/quill_editor'
require 'formtastic/inputs/quill_editor_input' require 'formtastic/inputs/quill_editor_input'

Просмотреть файл

@@ -1,5 +1,3 @@
# frozen_string_literal: true
module Formtastic module Formtastic
module Inputs module Inputs
class QuillEditorInput < Formtastic::Inputs::TextInput class QuillEditorInput < Formtastic::Inputs::TextInput