card-mod-prosemirror_editor 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,31 +0,0 @@
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