card-mod-tinymce_editor 0.13.4 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a023533067b2feebd55f4a46b3f297b2a2f2a4f877af1a57943d6f97702332a
4
- data.tar.gz: 8b3ffc1355fa1b02ab9783572d073db235c2b73f7f48a122ac6e81a5f5627595
3
+ metadata.gz: b02630154d786923c120e725ef6bd630d827c3dfc4f8f81153184d8bc3f20a40
4
+ data.tar.gz: b1f59d48e828ff6db5294a975352179ef693bc22f9b3cfa5ea78a12135ed4d11
5
5
  SHA512:
6
- metadata.gz: f991021a81da0bcb9a7f1a55a5a029a1c717131c975ebf03a884a8a9a9ae54c426927f0fd24024bb0b3337cf2b22797b700b1a9c99f497a4a3ee92093c34f984
7
- data.tar.gz: 3499041ad3c25e0576b77dc318b5cf4a503bb8038da2d2a006380e3141ec6188ddbdeeabb02169659054e2151fd2536219e0b5a60520d3337708d8c71d8c50bb
6
+ metadata.gz: 9bc87864440db94dd8e044b82e93fbca75f4fef7c412df076222202c0afbd509dc900e83e11d3e97280ee04a855806664da9e7f8d6412940a0b4ab651b9fd24f
7
+ data.tar.gz: 0abd3ac6d5b3f0abe7ceacfccae212b58507ecd0bd36f3e764d9698fd3acfd666491f52ad1a1a243999fdd8be3e6f3a90945dcdb4b91c84765f3205ecc5d8165
@@ -169,7 +169,7 @@ format :html do
169
169
  def unknown_nest_content
170
170
  voo.hide! :guide
171
171
  voo.show! :new_type_formgroup
172
- new_view_frame_and_form buttons: new_image_buttons,
173
- success: { tinymce_id: Env.params[:tinymce_id] }
172
+ voo.buttons_view = :new_image_buttons
173
+ framed_create_form success: { tinymce_id: Env.params[:tinymce_id] }
174
174
  end
175
175
  end
@@ -1,8 +1,7 @@
1
1
  format :html do
2
- view :nest_image, unknown: true, cache: :never,
3
- wrap: {
4
- slot: { class: "_overlay d0-card-overlay card nodblclick" }
5
- } do
2
+ view :nest_image,
3
+ unknown: true, cache: :never,
4
+ wrap: { slot: { class: "_overlay d0-card-overlay card nodblclick" } } do
6
5
  nest_image_editor :overlay
7
6
  end
8
7
 
@@ -12,7 +11,14 @@ format :html do
12
11
  end
13
12
 
14
13
  view :new_image, perms: :create, unknown: true, cache: :never do
15
- new_view_frame_and_form new_image_form_opts
14
+ voo.buttons_view = :new_image_buttons
15
+ framed_create_form success: { tinymce_id: Env.params[:tinymce_id], view: :open }
16
+ end
17
+
18
+ view :new_image_buttons do
19
+ button_formgroup do
20
+ [standard_save_button(no_origin_update: true, class: "_change-create-to-update")]
21
+ end
16
22
  end
17
23
 
18
24
  def nest_image_editor editor_mode
@@ -28,41 +34,25 @@ format :html do
28
34
  image_name = nest_name.to_name.right
29
35
  @nest_snippet = Card::Reference::NestParser.new_image image_name
30
36
  end
31
-
32
- def new_image_form_opts
33
- { buttons: new_image_buttons,
34
- success: { tinymce_id: Env.params[:tinymce_id],
35
- view: :open } }
36
- end
37
-
38
- def new_image_buttons
39
- button_formgroup do
40
- [standard_save_button(no_origin_update: true, class: "_change-create-to-update")]
41
- end
42
- end
43
37
  end
44
38
 
45
39
  format :js do
46
40
  view :change_create_to_update, unknown: true do
47
- tm_id = if Env.params[:tinymce_id].present?
48
- "\"#{Env.params[:tinymce_id]}\""
49
- else
50
- '$(".tinymce-textarea").attr("id")'
51
- end
52
- <<-JAVASCRIPT.strip_heredoc
53
- nest.changeCreateToUpdate(#{tm_id});
54
- JAVASCRIPT
41
+ "nest.changeCreateToUpdate(#{tinymce_id});"
55
42
  end
56
43
 
57
44
  view :open_nest_editor, unknown: true do
58
- tm_id = if Env.params[:tinymce_id].present?
59
- "\"#{Env.params[:tinymce_id]}\""
60
- else
61
- '$(".tinymce-textarea").attr("id")'
62
- end
63
45
  <<-JAVASCRIPT.strip_heredoc
64
- tm = tinymce.get(#{tm_id});
46
+ tm = tinymce.get(#{tinymce_id});
65
47
  nest.insertNest(tm, "{{+#{card.name.tag}|view: content; size: medium}}");
66
48
  JAVASCRIPT
67
49
  end
50
+
51
+ def tinymce_id
52
+ if Env.params[:tinymce_id].present?
53
+ "\"#{Env.params[:tinymce_id]}\""
54
+ else
55
+ '$(".tinymce-textarea").attr("id")'
56
+ end
57
+ end
68
58
  end
@@ -1,3 +1,6 @@
1
+ basket[:script_config][:tiny_mce] = "setTinyMCEConfig"
2
+ basket[:list_input_options] << "tinymce editor"
3
+
1
4
  format :html do
2
5
  def tinymce_editor_input
3
6
  text_area :content, rows: 3, class: "tinymce-textarea d0-card-content",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-tinymce_editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.4
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-09-24 00:00:00.000000000 Z
13
+ date: 2021-12-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.103.4
21
+ version: 1.104.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.103.4
28
+ version: 1.104.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-edit
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.13.4
35
+ version: 0.14.0
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.13.4
42
+ version: 0.14.0
43
43
  description: ''
44
44
  email:
45
45
  - info@decko.org
@@ -53,7 +53,6 @@ files:
53
53
  - db/migrate_core_cards/20171113233151_update_tinymce_config.rb
54
54
  - db/migrate_core_cards/20190306172623_update_tinymce_config_to_v5.rb
55
55
  - db/migrate_core_cards/20190306172890_tinymce_add_nest_to_toolbar.rb
56
- - file/mod_tinymce_editor_script_local_machine_output/file.js
57
56
  - lib/card/reference/nest_parser.rb
58
57
  - public/jquery.tinymce.min.js
59
58
  - public/langs/readme.md
@@ -136,8 +135,6 @@ files:
136
135
  - set/all/reference_editor/nest_image.rb
137
136
  - set/all/reference_editor/reference_editor.haml
138
137
  - set/all/tinymce_editor.rb
139
- - set/self/script_tinymce.rb
140
- - set/self/script_tinymce_config.rb
141
138
  - set/self/tiny_mce.rb
142
139
  homepage: https://decko.org
143
140
  licenses:
@@ -164,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
161
  - !ruby/object:Gem::Version
165
162
  version: '0'
166
163
  requirements: []
167
- rubygems_version: 3.1.6
164
+ rubygems_version: 3.2.15
168
165
  signing_key:
169
166
  specification_version: 4
170
167
  summary: TinyMCE editor