зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-09-07 04:05:49 +03:00
Сравнить коммиты
3 Коммитов
| Автор | SHA1 | Дата | |
|---|---|---|---|
|
|
7eea36b07d | ||
|
|
21806ca9b4 | ||
|
|
1f13f6c65a |
73
.rubocop.yml
73
.rubocop.yml
@@ -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
Gemfile
1
Gemfile
@@ -1,3 +1,4 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gemspec
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ Why 2 separated scripts? In this way you can include a different version of *qui
|
||||
|
||||
## 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
|
||||
|
||||
|
||||
4
Rakefile
4
Rakefile
@@ -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', __dir__)
|
||||
lib = File.expand_path('../lib', __FILE__)
|
||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||
require 'activeadmin/quill_editor/version'
|
||||
|
||||
@@ -17,5 +15,5 @@ Gem::Specification.new do |spec|
|
||||
spec.files = `git ls-files -z`.split("\x0")
|
||||
spec.require_paths = ['lib']
|
||||
|
||||
spec.add_runtime_dependency 'activeadmin', '>= 1.0'
|
||||
spec.add_runtime_dependency 'activeadmin', '2.0.0.alpha' # '~> 1.0'
|
||||
end
|
||||
|
||||
@@ -17,6 +17,8 @@ var initQuillEditors = function() {
|
||||
[{ 'align': [] }, { list: 'ordered' }, { list: 'bullet' }],
|
||||
[{ 'color': [] }, { 'background': [] }],
|
||||
['clean'],
|
||||
// [{ 'size': ['small', false, 'large', 'huge'] }],
|
||||
// [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
||||
]
|
||||
},
|
||||
placeholder: '',
|
||||
@@ -39,6 +41,8 @@ var initQuillEditors = function() {
|
||||
for( var i = 0; i < editors.length; i++ ) {
|
||||
var input = editors[i].querySelector( 'input[type="hidden"]' );
|
||||
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
|
||||
display: inline-block
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'activeadmin/quill_editor/engine'
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'active_admin'
|
||||
|
||||
module ActiveAdmin
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ActiveAdmin
|
||||
module QuillEditor
|
||||
VERSION = '0.2.0'
|
||||
VERSION = '0.1.4'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'activeadmin/quill_editor'
|
||||
|
||||
require 'formtastic/inputs/quill_editor_input'
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Formtastic
|
||||
module Inputs
|
||||
class QuillEditorInput < Formtastic::Inputs::TextInput
|
||||
|
||||
Ссылка в новой задаче
Block a user