ueditor.rails 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/default.config.js +6 -7
  3. data/lib/ueditor/helpers/js_helper.rb +8 -3
  4. data/lib/ueditor/version.rb +1 -1
  5. data/lib/ueditor.rails.rb +0 -1
  6. data/test/dummy/app/views/dummy/bla.html.erb +2 -0
  7. data/test/dummy/app/views/dummy/new.html.erb +1 -0
  8. data/test/dummy/app/views/layouts/application.html.erb +2 -2
  9. data/test/dummy/config/routes.rb +5 -1
  10. data/test/dummy/log/development.log +2015 -0
  11. data/test/dummy/tmp/cache/assets/development/sprockets/0f941886593d207e4ec1f3aba81f3189 +0 -0
  12. data/test/dummy/tmp/cache/assets/development/sprockets/19694ecb6829b547affeb420f6c4f4ba +0 -0
  13. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  14. data/test/dummy/tmp/cache/assets/development/sprockets/46854749351fc47882835fdd5d926bea +0 -0
  15. data/test/dummy/tmp/cache/assets/development/sprockets/46de6851f078c896ce0a451fe8e67691 +0 -0
  16. data/test/dummy/tmp/cache/assets/development/sprockets/77b1469bf8cd50f035d79b8326f184b4 +0 -0
  17. data/test/dummy/tmp/cache/assets/development/sprockets/8165d0bcd2b5c04b4a98f4f0cbabef64 +0 -0
  18. data/test/dummy/tmp/cache/assets/development/sprockets/ccf03bf3f93142e696fc061f7fe1555a +0 -0
  19. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  20. data/test/dummy/tmp/cache/assets/development/sprockets/d1051816874f7078fea20f1cd0f26545 +0 -0
  21. data/test/dummy/tmp/cache/assets/development/sprockets/d5634dc56e970484137b31bf0f8c15ae +0 -0
  22. data/test/dummy/tmp/cache/assets/development/sprockets/da3b8093655f85ac690e62d9a6c4202e +0 -0
  23. data/test/dummy/tmp/cache/assets/development/sprockets/e357c8a9ad97f42187ce017e3bf4a3ce +0 -0
  24. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  25. data/test/dummy/tmp/cache/assets/development/sprockets/fa046bb067616da9d14862739bf2c67c +0 -0
  26. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b94461361e7dc61e57987b8194f9516e2742a43
4
- data.tar.gz: 64d66297f4fcdc222f48ce16f70ba24b731b3813
3
+ metadata.gz: 8578e39193cc68678852170628588f3a56b89d22
4
+ data.tar.gz: 45219067cf1b191af96a48bb39281391f1dfa1ab
5
5
  SHA512:
6
- metadata.gz: 99f1aab9da026c14f60ad047a7b0d757e9a2adad3c21d88ddc7ae652d3b87c25152ebddd758833577d2ba44cc6e30ae86eecc5712c6a7b9fff85990f5542cfde
7
- data.tar.gz: a058c1a304399bc963d455b918f58cd711a71160f5a7d3c93cfd85816f64011d5b69485c1d56d0a5c04c206dbeedf5fda538fe7f049b31a9722f95ee32ba492c
6
+ metadata.gz: ebcaca9165eaeb210acdb19fe88e5cf24463495de285c5d3f9ed50e08ee4c7eedacf5a7dd7dd626facbc124cb0146e0eee43be914af61429c86c43a0b99e7cc3
7
+ data.tar.gz: e9877f586ad9bb3fea9e29daf74d396664da8bf641b86d909af712f7513f92e83c8579db839cccc00425b175e7696305bfef644f457fa5744f78b5bc3216fd27
@@ -11,9 +11,8 @@
11
11
 
12
12
  //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义
13
13
  , toolbars: [[
14
- 'bold', 'italic', 'underline',
15
- 'strikethrough', 'blockquote','insertorderedlist',
16
- 'insertunorderedlist', 'link', 'unlink', '|', "source"
14
+ 'bold', 'underline', 'strikethrough', 'blockquote','insertorderedlist',
15
+ 'insertunorderedlist', 'link', "unlink", "source"
17
16
  ]]
18
17
  //当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
19
18
  //,labelMap:{
@@ -66,7 +65,7 @@
66
65
  //,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况)
67
66
 
68
67
  //启用自动保存
69
- //,enableAutoSave: true
68
+ ,enableAutoSave: false
70
69
  //自动保存间隔时间, 单位ms
71
70
  //,saveInterval: 500
72
71
 
@@ -78,7 +77,7 @@
78
77
  //,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
79
78
 
80
79
  //粘贴只保留标签,去除标签所有属性
81
- //,retainOnlyLabelPasted: false
80
+ ,retainOnlyLabelPasted: true
82
81
 
83
82
  //,pasteplain:false //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
84
83
  //纯文本粘贴模式下的过滤规则
@@ -216,10 +215,10 @@
216
215
 
217
216
  //elementPathEnabled
218
217
  //是否启用元素路径,默认是显示
219
- //,elementPathEnabled : true
218
+ ,elementPathEnabled : false
220
219
 
221
220
  //wordCount
222
- //,wordCount:true //是否开启字数统计
221
+ ,wordCount: false //是否开启字数统计
223
222
  //,maximumWords:10000 //允许的最大字符数
224
223
  //字数统计提示,{#count}代表当前字数,{#leave}代表还可以输入多少字符数,留空支持多语言自动切换,否则按此配置显示
225
224
  //,wordCountMsg:'' //当前已输入 {#count} 个字符,您还可以输入{#leave} 个字符
@@ -3,10 +3,15 @@ module UEditor
3
3
  module JsHelper
4
4
  def uejs(id)
5
5
  javascript_tag <<-END.gsub(/^ {8}/, "")
6
- document.addEventListener("DOMContentLoaded", function(event) {
7
- UE.getEditor(\"#{id}\");
8
- });
6
+ function loadUEditor() {UE.getEditor('#{id}');}
7
+
8
+ if (window.UE) {
9
+ loadUEditor()
10
+ } else {
11
+ document.addEventListener('DOMContentLoaded', loadUEditor)
12
+ }
9
13
  END
14
+
10
15
  end
11
16
  end
12
17
  end
@@ -1,3 +1,3 @@
1
1
  module UEditor
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/ueditor.rails.rb CHANGED
@@ -12,6 +12,5 @@ module UEditor
12
12
  autoload :ViewHelper, "ueditor/helpers/view_helper"
13
13
  autoload :FormHelper, "ueditor/helpers/form_helper"
14
14
  autoload :FormBuilder, "ueditor/helpers/form_builder"
15
- autoload :Controllers, "ueditor/helpers/controllers"
16
15
  end
17
16
  end
@@ -0,0 +1,2 @@
1
+ <h1>Bla</h1>
2
+ <%= link_to "form", new_dummy_path %>
@@ -1,3 +1,4 @@
1
+ <%= link_to "bla", bla_dummy_path %>
1
2
  <h1>Builtin Form Helper</h1>
2
3
  <%= form_for @dummy_model, :url => "/dummy" do |f| %>
3
4
  <div><%= label_tag do %>
@@ -2,13 +2,13 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Dummy</title>
5
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
5
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
7
6
  <%= csrf_meta_tags %>
8
7
  </head>
9
8
  <body>
10
9
 
11
10
  <%= yield %>
12
11
 
12
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
13
13
  </body>
14
14
  </html>
@@ -1,4 +1,8 @@
1
1
  Rails.application.routes.draw do
2
2
  root "dummy#new"
3
- resource "dummy", :controller => :dummy
3
+ resource "dummy", :controller => :dummy do
4
+ member do
5
+ get :bla
6
+ end
7
+ end
4
8
  end