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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 828c96dd98d2332f83fe737009beb57db8ec7a22
|
4
|
+
data.tar.gz: e44693ce30eed3d4ae29e47d0a3aab1fbab34fea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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: @
|
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
|
-
|
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)
|
36
|
-
text_area
|
37
|
-
end
|
35
|
+
template.content_tag :div, '', class: %w(editor)
|
38
36
|
end
|
39
37
|
|
40
38
|
# @return [String]
|