card-mod-prosemirror_editor 0.1 → 0.2
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.
- checksums.yaml +4 -4
- data/LICENSE +674 -0
- data/README.md +21 -0
- data/set/all/prosemirror_editor.rb +6 -0
- data/set/self/prose_mirror.rb +8 -0
- metadata +27 -19
- data/db/migrate_core_cards/20160804112548_add_prosemirror_cards.rb +0 -30
- data/lib/javascript/script_prosemirror.js +0 -13243
- data/lib/javascript/script_prosemirror_config.js.coffee +0 -31
- data/lib/stylesheets/style_prosemirror.scss +0 -298
- data/set/self/script_prosemirror.rb +0 -4
- data/set/self/script_prosemirror_config.rb +0 -5
- data/set/self/style_prosemirror.rb +0 -3
data/README.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
<!--
|
2
|
+
# @title README - mod: Prosemirror editor
|
3
|
+
-->
|
4
|
+
|
5
|
+
# Prosemirror editor
|
6
|
+
|
7
|
+
Prosemirror is an embeddable code editor written in JavaScript. It can be used
|
8
|
+
as an alternative to the default tinyMCE editor.
|
9
|
+
|
10
|
+
## All cards
|
11
|
+
|
12
|
+
Adds `prosemirror editor` input type option.
|
13
|
+
|
14
|
+
## The "ProseMirror" card
|
15
|
+
|
16
|
+
| pattern | anchor | codename |
|
17
|
+
|:----:|:----:|:----:|
|
18
|
+
| Self | *ProseMirror | prose_mirror |
|
19
|
+
|
20
|
+
JSON card for configuring ProseMirror editor. See
|
21
|
+
https://prosemirror.net/docs/ref/.
|
@@ -1,5 +1,11 @@
|
|
1
|
+
basket[:list_input_options] << "prosemirror editor"
|
2
|
+
basket[:script_calls]["setProseMirrorConfig"] = :prosemirror_config
|
1
3
|
|
2
4
|
format :html do
|
5
|
+
def prosemirror_config
|
6
|
+
Card::Rule.global_setting :prose_mirror
|
7
|
+
end
|
8
|
+
|
3
9
|
def prosemirror_editor_input
|
4
10
|
wrap_with :div, id: unique_id, class: "prosemirror-editor" do
|
5
11
|
hidden_field :content, class: "d0-card-content", value: card.content
|
metadata
CHANGED
@@ -1,31 +1,44 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-prosemirror_editor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Ethan McCutchen
|
8
7
|
- Philipp Kühl
|
9
|
-
-
|
8
|
+
- Ethan McCutchen
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2023-10-17 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: card
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
15
28
|
- !ruby/object:Gem::Dependency
|
16
29
|
name: card-mod-edit
|
17
30
|
requirement: !ruby/object:Gem::Requirement
|
18
31
|
requirements:
|
19
|
-
- -
|
32
|
+
- - ">="
|
20
33
|
- !ruby/object:Gem::Version
|
21
|
-
version: '0
|
34
|
+
version: '0'
|
22
35
|
type: :runtime
|
23
36
|
prerelease: false
|
24
37
|
version_requirements: !ruby/object:Gem::Requirement
|
25
38
|
requirements:
|
26
|
-
- -
|
39
|
+
- - ">="
|
27
40
|
- !ruby/object:Gem::Version
|
28
|
-
version: '0
|
41
|
+
version: '0'
|
29
42
|
description: ''
|
30
43
|
email:
|
31
44
|
- info@decko.org
|
@@ -33,17 +46,12 @@ executables: []
|
|
33
46
|
extensions: []
|
34
47
|
extra_rdoc_files: []
|
35
48
|
files:
|
36
|
-
-
|
37
|
-
-
|
38
|
-
- lib/javascript/script_prosemirror_config.js.coffee
|
39
|
-
- lib/stylesheets/style_prosemirror.scss
|
49
|
+
- LICENSE
|
50
|
+
- README.md
|
40
51
|
- set/all/prosemirror_editor.rb
|
41
|
-
- set/self/
|
42
|
-
- set/self/script_prosemirror_config.rb
|
43
|
-
- set/self/style_prosemirror.rb
|
52
|
+
- set/self/prose_mirror.rb
|
44
53
|
homepage: http://decko.org
|
45
54
|
licenses:
|
46
|
-
- GPL-2.0
|
47
55
|
- GPL-3.0
|
48
56
|
metadata:
|
49
57
|
card-mod: prosemirror_editor
|
@@ -55,15 +63,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
55
63
|
requirements:
|
56
64
|
- - ">="
|
57
65
|
- !ruby/object:Gem::Version
|
58
|
-
version: 2.
|
66
|
+
version: '2.5'
|
59
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
68
|
requirements:
|
61
69
|
- - ">="
|
62
70
|
- !ruby/object:Gem::Version
|
63
71
|
version: '0'
|
64
72
|
requirements: []
|
65
|
-
rubygems_version: 3.
|
73
|
+
rubygems_version: 3.4.10
|
66
74
|
signing_key:
|
67
75
|
specification_version: 4
|
68
|
-
summary:
|
76
|
+
summary: Prose Mirror editor
|
69
77
|
test_files: []
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
|
3
|
-
class AddProsemirrorCards < Card::Migration
|
4
|
-
PM_CONFIG = <<-JSON.strip_heredoc
|
5
|
-
{
|
6
|
-
"menuBar": true,
|
7
|
-
"tooltipMenu": false
|
8
|
-
}
|
9
|
-
JSON
|
10
|
-
def up
|
11
|
-
ensure_card name: "*ProseMirror", type_id: Card::PlainTextID,
|
12
|
-
codename: "prose_mirror",
|
13
|
-
content: PM_CONFIG
|
14
|
-
create_or_update name: "*ProseMirrorz+*self+*help", content: pm_help
|
15
|
-
ensure_card name: "script: prosemirror", type_id: Card::JavaScriptID,
|
16
|
-
codename: "script_prosemirror"
|
17
|
-
ensure_card name: "style: prosemirror", type_id: Card::ScssID,
|
18
|
-
codename: "style_prosemirror"
|
19
|
-
ensure_card name: "script: prosemirror config",
|
20
|
-
type_id: Card::CoffeeScriptID,
|
21
|
-
codename: "script_prosemirror_config"
|
22
|
-
end
|
23
|
-
|
24
|
-
def pm_help
|
25
|
-
"Configure [[http://prosemirror.net|ProseMirror]], "\
|
26
|
-
"Decko's default "\
|
27
|
-
"[[http://en.wikipedia.org/wiki/Wysiwyg|wysiwyg]] editor. "\
|
28
|
-
"[[https://decko.org/ProseMirror|more]]"
|
29
|
-
end
|
30
|
-
end
|