card-mod-prosemirror_editor 0.13.1 → 0.13.2

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
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.1
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.103.1
21
+ version: 1.103.2
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.1
28
+ version: 1.103.2
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.1
35
+ version: 0.13.2
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.1
42
+ version: 0.13.2
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