card-mod-prosemirror_editor 0.13.0 → 0.13.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,31 @@
1
+ decko.addEditor(
2
+ '.prosemirror-editor',
3
+ ->
4
+ decko.initProseMirror @[0].id,
5
+ ->
6
+ prosemirrorContent @[0].id
7
+ )
8
+
9
+ $.extend decko,
10
+ setProseMirrorConfig: (string) ->
11
+ setter = ->
12
+ try
13
+ $.parseJSON string
14
+ catch
15
+ {}
16
+ decko.proseMirrorConfig = setter()
17
+
18
+ initProseMirror: (el_id) ->
19
+ conf = {
20
+ menuBar: true,
21
+ tooltipMenu: false
22
+ }
23
+ hard_conf = { docFormat: "html" }
24
+ user_conf = if decko.proseMirrorConfig? then decko.proseMirrorConfig else {}
25
+ $.extend conf, user_conf, hard_conf
26
+ createProseMirror(el_id, conf)
27
+
28
+ prosemirrorContent = (id) ->
29
+ content = getProseMirrorContent(id)
30
+ return '' if content == '<p></p>'
31
+ content
@@ -1,3 +1,3 @@
1
1
  include_set Abstract::CodeFile
2
2
 
3
- Self::InputOptions.add_to_basket :options, "prosemirror editor"
3
+ basket[:list_input_options] << "prosemirror editor"
@@ -1,4 +1,3 @@
1
1
  include_set Abstract::CodeFile
2
2
 
3
- All::Head::HtmlFormat.add_to_basket :mod_js_config,
4
- [:prose_mirror, "setProseMirrorConfig"]
3
+ basket[:script_config][:prose_mirror] = "setProseMirrorConfig"
@@ -1,3 +1,3 @@
1
1
  include_set Abstract::CodeFile
2
2
 
3
- Self::StyleMods.add_item :style_prosemirror
3
+ basket[:style_mods] << :style_prosemirror
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-prosemirror_editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.4
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-08-06 00:00:00.000000000 Z
13
+ date: 2021-09-24 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.0
21
+ version: 1.103.4
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.0
28
+ version: 1.103.4
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.0
35
+ version: 0.13.4
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.0
42
+ version: 0.13.4
43
43
  description: ''
44
44
  email:
45
45
  - info@decko.org
@@ -47,6 +47,8 @@ executables: []
47
47
  extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
+ - assets/script/script_prosemirror.js
51
+ - assets/script/script_prosemirror_config.js.coffee
50
52
  - db/migrate_core_cards/20160804112548_add_prosemirror_cards.rb
51
53
  - file/mod_prosemirror_editor_script_local_machine_output/file.js
52
54
  - lib/stylesheets/style_prosemirror.scss