dante-editor 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +16 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -0
- data/TODO.md +2 -6
- data/{source → app}/assets/fonts/fontello.eot +0 -0
- data/{source → app}/assets/fonts/fontello.svg +0 -0
- data/{source → app}/assets/fonts/fontello.ttf +0 -0
- data/{source → app}/assets/fonts/fontello.woff +0 -0
- data/{source/assets/images → app/assets/images/dante}/media-loading-placeholder.png +0 -0
- data/{source → app}/assets/javascripts/dante.js +0 -0
- data/{source → app}/assets/javascripts/dante/dante.js.coffee.erb +2 -0
- data/{source → app}/assets/javascripts/dante/editor.js.coffee +6 -5
- data/{source → app}/assets/javascripts/dante/menu.js.coffee +4 -4
- data/{source → app}/assets/javascripts/dante/tooltip.js.coffee +0 -0
- data/{source → app}/assets/javascripts/dante/utils.js.coffee +0 -0
- data/{source → app}/assets/javascripts/dante/view.js.coffee +0 -0
- data/{source → app}/assets/stylesheets/dante.css.scss +0 -0
- data/{source → app}/assets/stylesheets/dante/base.css.scss +0 -0
- data/{source → app}/assets/stylesheets/dante/editor.css.scss +0 -0
- data/{source → app}/assets/stylesheets/dante/fonts.css.scss +0 -0
- data/dante-editor.gemspec +1 -1
- data/lib/dante-editor.rb +2 -0
- data/lib/dante-editor/rails.rb +4 -0
- data/lib/dante-editor/version.rb +1 -1
- data/source/assets/javascripts/editor.js +1 -0
- data/source/assets/stylesheets/editor.css.scss +1 -0
- data/source/layouts/layout.erb +2 -2
- metadata +21 -21
- data/source/assets/images/background.png +0 -0
- data/source/assets/images/icon.png +0 -0
- data/source/assets/images/middleman.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a52e2126d77969614fd8f182ae9f639362a0a9ce
|
4
|
+
data.tar.gz: b32b6c838894dba0f3ea145431e1f38593efcdfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96f21f5f46e07dff4980e97be6a9475301c9def7a4114bc8575c13c41f30e5145021e6df6fdeff1324321567a0f952a1f9f2ca3799a892f083367378644480b1
|
7
|
+
data.tar.gz: f1f6924ff1d986e52ae25eb334945310461a7ecc26cb6f1d509c072e597bba74f950eaf7188e90f2c2138b19d829501199b62cfbb04348a755e423dc684e7bd8
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -60,6 +60,9 @@ Until now I´ve been able to implement the following features:
|
|
60
60
|
upload_url: default: /uploads.json
|
61
61
|
oembed_url: default: http://api.embed.ly/1/oembed?url="
|
62
62
|
extract_url: default: http://api.embed.ly/1/extract?url="
|
63
|
+
store_url: url to store data with interval , defaults to none
|
64
|
+
store_interval: default: 15000 (15 secs)
|
65
|
+
default_loading_placeholder: image placeholder to show when uploaded/pasted images are loading , defaults to a grey background
|
63
66
|
|
64
67
|
### Rails / AssetPippeline
|
65
68
|
|
data/TODO.md
CHANGED
@@ -3,22 +3,18 @@
|
|
3
3
|
|
4
4
|
+ GENERALS
|
5
5
|
+ FF in case markup breaks (like linebreak with br or unwraped text when typing) just rewrap from current range.
|
6
|
+
+ Check double clicks on first p
|
6
7
|
|
7
|
-
+ SANITIZE PROCESS
|
8
|
-
+ childs links inside first level elements clean & add classes ie
|
9
|
-
|
10
|
-
a target="_blank" href="#" data-href="#" class="markup--anchor markup--p-anchor" data-tooltip="#" data-tooltip-position="bottom" data-tooltip-type="link">example link</a>
|
8
|
+
+ SANITIZE PROCESS
|
11
9
|
|
12
10
|
+ MENU
|
13
11
|
+ Filter inner tags (except a, b, i ... ) when convert to blockquote
|
14
12
|
|
15
13
|
+ DELETE
|
16
|
-
|
17
14
|
+ handle remove from PRE tag, it set rare span, just remove it
|
18
15
|
+ clean node when remove one
|
19
16
|
|
20
17
|
+ IMAGES:
|
21
|
-
|
22
18
|
+ upload, show progress, complete
|
23
19
|
+ handle enter (linebreak) when selected in caption (build new P)
|
24
20
|
+ Fix problem in FF when linebreak or arrow down to new P , is typing backwards!! (could be a range 1 char problem ?)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -3,10 +3,9 @@ selected_menu = false
|
|
3
3
|
utils = Dante.utils
|
4
4
|
|
5
5
|
class Dante.Editor extends Dante.View
|
6
|
-
#el: "#editor"
|
7
6
|
|
8
7
|
events:
|
9
|
-
"blur" : "handleBlur"
|
8
|
+
#"blur" : "handleBlur"
|
10
9
|
"mouseup" : "handleMouseUp"
|
11
10
|
"keydown" : "handleKeyDown"
|
12
11
|
"keyup" : "handleKeyUp"
|
@@ -25,8 +24,9 @@ class Dante.Editor extends Dante.View
|
|
25
24
|
@upload_url = opts.upload_url || "/uploads.json"
|
26
25
|
@oembed_url = opts.oembed_url || "http://api.embed.ly/1/oembed?url="
|
27
26
|
@extract_url = opts.extract_url || "http://api.embed.ly/1/extract?key=86c28a410a104c8bb58848733c82f840&url="
|
28
|
-
@default_loading_placeholder = opts.default_loading_placeholder ||
|
27
|
+
@default_loading_placeholder = opts.default_loading_placeholder || Dante.defaults.image_placeholder
|
29
28
|
@store_url = opts.store_url
|
29
|
+
@store_interval = opts.store_interval || 15000
|
30
30
|
if (localStorage.getItem('contenteditable'))
|
31
31
|
$(@el).html localStorage.getItem('contenteditable')
|
32
32
|
|
@@ -42,7 +42,7 @@ class Dante.Editor extends Dante.View
|
|
42
42
|
return unless @store_url
|
43
43
|
setTimeout ()=>
|
44
44
|
@checkforStore()
|
45
|
-
,
|
45
|
+
, @store_interval
|
46
46
|
|
47
47
|
checkforStore: ()->
|
48
48
|
if @content is @getContent()
|
@@ -263,7 +263,8 @@ class Dante.Editor extends Dante.View
|
|
263
263
|
handleBlur: (ev)=>
|
264
264
|
#hide menu only if is not in use
|
265
265
|
setTimeout ()=>
|
266
|
-
|
266
|
+
utils.log "not in use"
|
267
|
+
#@editor_menu.hide() unless selected_menu
|
267
268
|
, 200
|
268
269
|
false
|
269
270
|
|
@@ -118,6 +118,9 @@ class Dante.Editor.Menu extends Dante.View
|
|
118
118
|
n = @current_editor.getNode()
|
119
119
|
@current_editor.setupLinks($(n).find("a"))
|
120
120
|
@displayHighlights()
|
121
|
+
if $(n).parent().hasClass("section-inner")
|
122
|
+
n = @current_editor.addClassesToElement(n)
|
123
|
+
@current_editor.setElementName(n)
|
121
124
|
else
|
122
125
|
utils.log "fail" + message, true
|
123
126
|
return
|
@@ -166,11 +169,8 @@ class Dante.Editor.Menu extends Dante.View
|
|
166
169
|
tag = node.nodeName.toLowerCase()
|
167
170
|
switch tag
|
168
171
|
when "a"
|
169
|
-
|
172
|
+
$(@el).find('input').val $(node).attr("href")
|
170
173
|
tag = "createlink"
|
171
|
-
when "img"
|
172
|
-
menu.querySelector("input").value = item.getAttribute("src")
|
173
|
-
tag = "insertimage"
|
174
174
|
when "i"
|
175
175
|
tag = "italic"
|
176
176
|
when "u"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/dante-editor.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.email = ["miguelmichelson@gmail.com"]
|
11
11
|
gem.description = %q{dante-editor yet another Medium editor clone.}
|
12
12
|
gem.summary = %q{dante-editor yet another Medium editor clone.}
|
13
|
-
gem.homepage = ""
|
13
|
+
gem.homepage = "http://michelson.github.io/Dante/"
|
14
14
|
|
15
15
|
gem.files = `git ls-files`.split($/)
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
data/lib/dante-editor.rb
CHANGED
data/lib/dante-editor/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
//= require dante
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "dante";
|
data/source/layouts/layout.erb
CHANGED
@@ -6,8 +6,8 @@
|
|
6
6
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
7
7
|
<title><%= current_page.data.title || "The Middleman" %></title>
|
8
8
|
<%= stylesheet_link_tag "http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css" %>
|
9
|
-
<%= stylesheet_link_tag "normalize", "
|
10
|
-
<%= javascript_include_tag "deps", "
|
9
|
+
<%= stylesheet_link_tag "normalize", "editor" %>
|
10
|
+
<%= javascript_include_tag "deps", "editor" %>
|
11
11
|
</head>
|
12
12
|
|
13
13
|
<body class="<%= page_classes %>">
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dante-editor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Michelson
|
@@ -24,41 +24,41 @@ files:
|
|
24
24
|
- Procfile
|
25
25
|
- README.md
|
26
26
|
- TODO.md
|
27
|
+
- app/assets/fonts/fontello.eot
|
28
|
+
- app/assets/fonts/fontello.svg
|
29
|
+
- app/assets/fonts/fontello.ttf
|
30
|
+
- app/assets/fonts/fontello.woff
|
31
|
+
- app/assets/images/dante/media-loading-placeholder.png
|
32
|
+
- app/assets/javascripts/dante.js
|
33
|
+
- app/assets/javascripts/dante/dante.js.coffee.erb
|
34
|
+
- app/assets/javascripts/dante/editor.js.coffee
|
35
|
+
- app/assets/javascripts/dante/menu.js.coffee
|
36
|
+
- app/assets/javascripts/dante/tooltip.js.coffee
|
37
|
+
- app/assets/javascripts/dante/utils.js.coffee
|
38
|
+
- app/assets/javascripts/dante/view.js.coffee
|
39
|
+
- app/assets/stylesheets/dante.css.scss
|
40
|
+
- app/assets/stylesheets/dante/base.css.scss
|
41
|
+
- app/assets/stylesheets/dante/editor.css.scss
|
42
|
+
- app/assets/stylesheets/dante/fonts.css.scss
|
27
43
|
- bower.json
|
28
44
|
- config.rb
|
29
45
|
- config.ru
|
30
46
|
- dante-editor.gemspec
|
31
47
|
- lib/dante-editor.rb
|
48
|
+
- lib/dante-editor/rails.rb
|
32
49
|
- lib/dante-editor/version.rb
|
33
50
|
- license.md
|
34
51
|
- rakefile
|
35
|
-
- source/assets/fonts/fontello.eot
|
36
|
-
- source/assets/fonts/fontello.svg
|
37
|
-
- source/assets/fonts/fontello.ttf
|
38
|
-
- source/assets/fonts/fontello.woff
|
39
|
-
- source/assets/images/background.png
|
40
52
|
- source/assets/images/icon-logo.png
|
41
|
-
- source/assets/images/icon.png
|
42
|
-
- source/assets/images/media-loading-placeholder.png
|
43
|
-
- source/assets/images/middleman.png
|
44
53
|
- source/assets/javascripts/all.js
|
45
|
-
- source/assets/javascripts/dante.js
|
46
|
-
- source/assets/javascripts/dante/dante.js.coffee.erb
|
47
|
-
- source/assets/javascripts/dante/editor.js.coffee
|
48
|
-
- source/assets/javascripts/dante/menu.js.coffee
|
49
|
-
- source/assets/javascripts/dante/tooltip.js.coffee
|
50
|
-
- source/assets/javascripts/dante/utils.js.coffee
|
51
|
-
- source/assets/javascripts/dante/view.js.coffee
|
52
54
|
- source/assets/javascripts/deps.js
|
55
|
+
- source/assets/javascripts/editor.js
|
53
56
|
- source/assets/javascripts/spec.js
|
54
57
|
- source/assets/javascripts/specs/cleaner.js.coffee
|
55
58
|
- source/assets/javascripts/specs/dante_view.js.coffee
|
56
59
|
- source/assets/javascripts/specs/editor.js.coffee
|
57
60
|
- source/assets/stylesheets/all.css.scss
|
58
|
-
- source/assets/stylesheets/
|
59
|
-
- source/assets/stylesheets/dante/base.css.scss
|
60
|
-
- source/assets/stylesheets/dante/editor.css.scss
|
61
|
-
- source/assets/stylesheets/dante/fonts.css.scss
|
61
|
+
- source/assets/stylesheets/editor.css.scss
|
62
62
|
- source/assets/stylesheets/normalize.css
|
63
63
|
- source/embeds.html.erb
|
64
64
|
- source/index.html.erb
|
@@ -73,7 +73,7 @@ files:
|
|
73
73
|
- source/tests/dante_view.html.erb
|
74
74
|
- source/tests/index.html.erb
|
75
75
|
- tmp/.gitkeep
|
76
|
-
homepage:
|
76
|
+
homepage: http://michelson.github.io/Dante/
|
77
77
|
licenses: []
|
78
78
|
metadata: {}
|
79
79
|
post_install_message:
|
Binary file
|
Binary file
|
Binary file
|