Π·Π΅ΡΠΊΠ°Π»ΠΎ ΠΈΠ·
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-09-03 10:16:18 +03:00
π Support ActiveAdmin 2.x and code style improvements
- Add support ActiveAdmin for 2.x - Add rubocop config - Add frozen_string_literal to ruby files - Apply changes to respect rubocop alerts
ΠΡΠΎΡ ΠΊΠΎΠΌΠΌΠΈΡ ΡΠΎΠ΄Π΅ΡΠΆΠΈΡΡΡ Π²:
@@ -1 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'activeadmin/quill_editor/engine'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'active_admin'
|
||||
|
||||
module ActiveAdmin
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ActiveAdmin
|
||||
module QuillEditor
|
||||
VERSION = '0.1.4'
|
||||
VERSION = '0.2.0'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'activeadmin/quill_editor'
|
||||
|
||||
require 'formtastic/inputs/quill_editor_input'
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Formtastic
|
||||
module Inputs
|
||||
class QuillEditorInput < Formtastic::Inputs::TextInput
|
||||
def to_html
|
||||
input_wrapping do
|
||||
label_html <<
|
||||
template.content_tag( :div, input_html_options.merge( class: 'quill-editor' ) ) do
|
||||
builder.hidden_field( input_name ) <<
|
||||
template.content_tag( :div, class: 'quill-editor-content' ) do
|
||||
object.send( method ).try :html_safe
|
||||
template.content_tag(:div, input_html_options.merge(class: 'quill-editor')) do
|
||||
builder.hidden_field(input_name) <<
|
||||
template.content_tag(:div, class: 'quill-editor-content') do
|
||||
object.send(method).try :html_safe
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Π‘ΡΡΠ»ΠΊΠ° Π² Π½ΠΎΠ²ΠΎΠΉ Π·Π°Π΄Π°ΡΠ΅
Block a user