activeadmin_ckeditor5 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ body.active_admin [data-activeadmin-ckeditor='1'] {
2
+ display: inline-block;
3
+ width: calc(80% - 22px);
4
+ }
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_admin'
4
+
5
+ module ActiveAdmin
6
+ module Ckeditor
7
+ class Engine < ::Rails::Engine
8
+ engine_name 'activeadmin_ckeditor5'
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Activeadmin
4
+ module Ckeditor
5
+ VERSION = "0.1.0"
6
+ CKEDITOR = '0.1.1'
7
+ end
8
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'activeadmin/ckeditor/engine'
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'activeadmin/ckeditor'
4
+
5
+ require 'formtastic/inputs/ckeditor_input'
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Formtastic
4
+ module Inputs
5
+ class CkeditorInput < Formtastic::Inputs::TextInput
6
+ def to_html
7
+ input_wrapping do
8
+ label_html <<
9
+ template.content_tag(:div, input_html_options.merge('data-activeadmin-ckeditor': '1')) do
10
+ builder.hidden_field(input_name) <<
11
+ template.content_tag(:div, 'data-activeadmin-ckcontent': '1') do
12
+ object.send(method).try :html_safe
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
metadata ADDED
@@ -0,0 +1,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: activeadmin_ckeditor5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - MingXuanSu
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-01-10 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Rails activeadmin integrated CKEditor 5
14
+ email:
15
+ - ohmyhysss@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - CHANGELOG.md
21
+ - LICENSE.txt
22
+ - README.md
23
+ - activeadmin_ckeditor5.gemspec
24
+ - app/assets/javascripts/activeadmin/ckeditor-init.js
25
+ - app/assets/javascripts/activeadmin/ckeditor.js
26
+ - app/assets/stylesheets/activeadmin/ckeditor.scss
27
+ - lib/activeadmin/ckeditor.rb
28
+ - lib/activeadmin/ckeditor/engine.rb
29
+ - lib/activeadmin/ckeditor/version.rb
30
+ - lib/activeadmin_ckeditor5.rb
31
+ - lib/formtastic/inputs/ckeditor_input.rb
32
+ homepage: https://github.com/SuMingXuan/activeadmin_ckeditor5
33
+ licenses:
34
+ - MIT
35
+ metadata:
36
+ homepage_uri: https://github.com/SuMingXuan/activeadmin_ckeditor5
37
+ source_code_uri: https://github.com/SuMingXuan/activeadmin_ckeditor5
38
+ post_install_message:
39
+ rdoc_options: []
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 2.4.0
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ requirements: []
53
+ rubygems_version: 3.2.22
54
+ signing_key:
55
+ specification_version: 4
56
+ summary: Rails activeadmin integrated CKEditor 5
57
+ test_files: []