simple_form_epic_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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b4c183688af9e5bf6e618e592b9a64aa8e59bd3
4
- data.tar.gz: 7754ea2e7546d9676896a37a27d445ac2c4fa4a2
3
+ metadata.gz: 828c96dd98d2332f83fe737009beb57db8ec7a22
4
+ data.tar.gz: e44693ce30eed3d4ae29e47d0a3aab1fbab34fea
5
5
  SHA512:
6
- metadata.gz: 1d6062e93209efce2042fdaa47bb9787fcdbd8bd92652df870ec32de68939324f8a5fb0b9845194a1de578623800a4d8d9520f829162536cf30c9d7a79c0d642
7
- data.tar.gz: 0afe8e12ec525ca184a0b8934a1fff92b5cec8b5e552d17d8dd2d08d58e991a704b47a65b3f60ccedef071967d199eac3bc0bb0515ca366c8fde3ea1089c66d8
6
+ metadata.gz: 914b0e7ab2447f1e1b553f595e76489c5d52c69aa83717375a5a49a0937adabff2256bec0497c8098dbbdcc3dc0e2a6b0d774453a93f02231215de722edffefc
7
+ data.tar.gz: 518881680650e6349e42a1310d5c23d90cf5c5bf4a710c1fff1acd5dfc5f37b3f11c27624524feed261361c5893e4c4d1b5aa31521a4f9583f564109f5950215
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Simple Form Epic Editor
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/simple_form_epic_editor.svg)](http://badge.fury.io/rb/simple_form_epic_editor)
4
+
3
5
  Integrates the markdown editor [Epic Editor](https://github.com/OscarGodson/EpicEditor) with Rails and [Simple Form](https://github.com/plataformatec/simple_form).
4
6
 
5
7
  This gem adjusts the default theme of [Epic Editor](https://github.com/OscarGodson/EpicEditor) and places the toolbar above the editing field.
@@ -21,11 +21,13 @@ do ($ = jQuery, window, document) ->
21
21
  init: ->
22
22
  console.log 'init' if @settings.debug
23
23
 
24
+ @get_textarea().hide()
25
+
24
26
  # ---------------------------------------------------------------------
25
27
 
26
28
  e = new EpicEditor(
27
29
  container: @get_editor_wrapper().get(0)
28
- textarea: @get_editor_textarea().get(0)
30
+ textarea: @get_textarea().get(0)
29
31
  basePath: '/assets'
30
32
  theme: {
31
33
  base: "<%= SimpleFormEpicEditor::EpicEditorInput.configuration.theme[:base] %>"
@@ -49,7 +51,7 @@ do ($ = jQuery, window, document) ->
49
51
 
50
52
  get_editor_wrapper: -> @$element.children('div.editor:first')
51
53
  get_editor_toolbar: -> @$element.children('div.toolbar:first')
52
- get_editor_textarea: -> @get_editor_wrapper().children('textarea:first')
54
+ get_textarea: -> @$element.children('textarea:first')
53
55
  get_toolbar_ul: -> @get_editor_toolbar().children('ul:first')
54
56
  get_toolbar_lis: -> @get_toolbar_ul().children('li')
55
57
 
@@ -20,7 +20,7 @@ module SimpleFormEpicEditor
20
20
 
21
21
  # @return [String]
22
22
  def input
23
- toolbar + editor
23
+ toolbar + text_area + editor
24
24
  end
25
25
 
26
26
  private # =============================================================
@@ -32,9 +32,7 @@ module SimpleFormEpicEditor
32
32
  end
33
33
 
34
34
  def editor
35
- template.content_tag :div, class: %w(editor) do
36
- text_area
37
- end
35
+ template.content_tag :div, '', class: %w(editor)
38
36
  end
39
37
 
40
38
  # @return [String]
@@ -1,3 +1,3 @@
1
1
  module SimpleFormEpicEditor
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_epic_editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna