md_simple_editor 0.3.0 → 0.4.0
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/.idea/md_simple_editor.iml +5 -10
- data/.idea/vcs.xml +2 -3
- data/.idea/workspace.xml +153 -29
- data/README.md +14 -4
- data/app/assets/stylesheets/md_simple_editor.css.scss +3 -1
- data/app/controllers/md_simple_editor_controller.rb +1 -1
- data/app/helpers/md_simple_editor/rails/md_helper.rb +1 -2
- data/lib/md_simple_editor/version.rb +1 -1
- data/md_simple_editor.gemspec +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4174c8462382d1ceec77abb3cec653032fef0bb6
|
|
4
|
+
data.tar.gz: 0fec4fb70e1ff0a23b4d66e587640c79cdc5e5ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bde89fc566ea3ae806ee08b5c5e750ac83d59259cb3426c256f39e6a5edbd258287a4065fa004e9c966c29620dc87c49047159ce05a96c37ca6bdef19317c6ec
|
|
7
|
+
data.tar.gz: 24f5ae11492d42b6338bf35a2dcb732c37111ff56f80a3f2cb012533beb4d7ac69b4371a4bfd3ef5c0a0600e969bccbd52f08928777c3579f40d17b62e2ce2a8
|
data/.idea/md_simple_editor.iml
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<module type="RUBY_MODULE" version="4">
|
|
3
|
-
<component name="CompassSettings">
|
|
4
|
-
<option name="compassSupportEnabled" value="true" />
|
|
5
|
-
</component>
|
|
6
3
|
<component name="FacetManager">
|
|
7
4
|
<facet type="gem" name="Ruby Gem">
|
|
8
|
-
<configuration
|
|
9
|
-
<option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
|
|
10
|
-
<option name="GEM_APP_TEST_PATH" value="" />
|
|
11
|
-
<option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
|
|
12
|
-
</configuration>
|
|
5
|
+
<configuration />
|
|
13
6
|
</facet>
|
|
14
7
|
</component>
|
|
8
|
+
<component name="ModuleRunConfigurationManager">
|
|
9
|
+
<shared />
|
|
10
|
+
</component>
|
|
15
11
|
<component name="NewModuleRootManager">
|
|
16
12
|
<content url="file://$MODULE_DIR$" />
|
|
17
13
|
<orderEntry type="inheritedJdk" />
|
|
@@ -19,5 +15,4 @@
|
|
|
19
15
|
<orderEntry type="library" scope="PROVIDED" name="erubis (v2.7.0, RVM: ruby-1.9.3-p392) [gem]" level="application" />
|
|
20
16
|
<orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.2, RVM: ruby-1.9.3-p392) [gem]" level="application" />
|
|
21
17
|
</component>
|
|
22
|
-
</module>
|
|
23
|
-
|
|
18
|
+
</module>
|
data/.idea/vcs.xml
CHANGED
data/.idea/workspace.xml
CHANGED
|
@@ -1,56 +1,180 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<project version="4">
|
|
3
3
|
<component name="ChangeListManager">
|
|
4
|
-
<
|
|
4
|
+
<list default="true" id="8c663ecd-d50c-4d78-b11a-ad11c976969c" name="Default Changelist" comment="">
|
|
5
|
+
<change beforePath="$PROJECT_DIR$/.idea/md_simple_editor.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/md_simple_editor.iml" afterDir="false" />
|
|
6
|
+
<change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
|
|
7
|
+
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
|
8
|
+
<change beforePath="$PROJECT_DIR$/lib/md_simple_editor/version.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/md_simple_editor/version.rb" afterDir="false" />
|
|
9
|
+
<change beforePath="$PROJECT_DIR$/md_simple_editor.gemspec" beforeDir="false" afterPath="$PROJECT_DIR$/md_simple_editor.gemspec" afterDir="false" />
|
|
10
|
+
</list>
|
|
11
|
+
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
|
5
12
|
<option name="SHOW_DIALOG" value="false" />
|
|
6
13
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
7
14
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
8
15
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
9
16
|
</component>
|
|
10
|
-
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
|
11
17
|
<component name="CreatePatchCommitExecutor">
|
|
12
18
|
<option name="PATCH_PATH" value="" />
|
|
13
19
|
</component>
|
|
14
|
-
<component name="
|
|
15
|
-
<
|
|
20
|
+
<component name="FileEditorManager">
|
|
21
|
+
<leaf>
|
|
22
|
+
<file pinned="false" current-in-tab="false">
|
|
23
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
|
24
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
25
|
+
<state relative-caret-position="90">
|
|
26
|
+
<caret line="6" lean-forward="true" selection-start-line="6" selection-end-line="6" />
|
|
27
|
+
</state>
|
|
28
|
+
</provider>
|
|
29
|
+
</entry>
|
|
30
|
+
</file>
|
|
31
|
+
<file pinned="false" current-in-tab="true">
|
|
32
|
+
<entry file="file://$PROJECT_DIR$/md_simple_editor.gemspec">
|
|
33
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
34
|
+
<state relative-caret-position="405">
|
|
35
|
+
<caret line="27" lean-forward="true" selection-start-line="27" selection-end-line="27" />
|
|
36
|
+
</state>
|
|
37
|
+
</provider>
|
|
38
|
+
</entry>
|
|
39
|
+
</file>
|
|
40
|
+
<file pinned="false" current-in-tab="false">
|
|
41
|
+
<entry file="file://$PROJECT_DIR$/lib/md_simple_editor/version.rb">
|
|
42
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
43
|
+
<state relative-caret-position="45">
|
|
44
|
+
<caret line="3" lean-forward="true" selection-start-line="3" selection-end-line="3" />
|
|
45
|
+
</state>
|
|
46
|
+
</provider>
|
|
47
|
+
</entry>
|
|
48
|
+
</file>
|
|
49
|
+
</leaf>
|
|
16
50
|
</component>
|
|
17
|
-
<component name="
|
|
18
|
-
<
|
|
19
|
-
<OptionsSetting value="true" id="Remove" />
|
|
20
|
-
<OptionsSetting value="true" id="Checkout" />
|
|
21
|
-
<OptionsSetting value="true" id="Update" />
|
|
22
|
-
<OptionsSetting value="true" id="Status" />
|
|
23
|
-
<OptionsSetting value="true" id="Edit" />
|
|
24
|
-
<ConfirmationsSetting value="0" id="Add" />
|
|
25
|
-
<ConfirmationsSetting value="0" id="Remove" />
|
|
51
|
+
<component name="Git.Settings">
|
|
52
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
26
53
|
</component>
|
|
54
|
+
<component name="IdeDocumentHistory">
|
|
55
|
+
<option name="CHANGED_PATHS">
|
|
56
|
+
<list>
|
|
57
|
+
<option value="$PROJECT_DIR$/md_simple_editor.gemspec" />
|
|
58
|
+
<option value="$PROJECT_DIR$/lib/md_simple_editor/version.rb" />
|
|
59
|
+
</list>
|
|
60
|
+
</option>
|
|
61
|
+
</component>
|
|
62
|
+
<component name="ProjectFrameBounds">
|
|
63
|
+
<option name="y" value="23" />
|
|
64
|
+
<option name="width" value="1920" />
|
|
65
|
+
<option name="height" value="1027" />
|
|
66
|
+
</component>
|
|
67
|
+
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
|
27
68
|
<component name="ProjectReloadState">
|
|
28
69
|
<option name="STATE" value="0" />
|
|
29
70
|
</component>
|
|
71
|
+
<component name="ProjectView">
|
|
72
|
+
<navigator proportions="" version="1">
|
|
73
|
+
<foldersAlwaysOnTop value="true" />
|
|
74
|
+
</navigator>
|
|
75
|
+
<panes>
|
|
76
|
+
<pane id="Scope" />
|
|
77
|
+
<pane id="ProjectPane">
|
|
78
|
+
<subPane>
|
|
79
|
+
<expand>
|
|
80
|
+
<path>
|
|
81
|
+
<item name="md_simple_editor" type="b2602c69:ProjectViewProjectNode" />
|
|
82
|
+
<item name="md_simple_editor" type="462c0819:PsiDirectoryNode" />
|
|
83
|
+
</path>
|
|
84
|
+
</expand>
|
|
85
|
+
<select />
|
|
86
|
+
</subPane>
|
|
87
|
+
</pane>
|
|
88
|
+
</panes>
|
|
89
|
+
</component>
|
|
30
90
|
<component name="PropertiesComponent">
|
|
91
|
+
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
|
92
|
+
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
93
|
+
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
|
31
94
|
<property name="options.lastSelected" value="reference.settingsdialog.project.vagrant" />
|
|
32
|
-
<property name="options.splitter.main.proportions" value="0.3" />
|
|
33
|
-
<property name="options.splitter.details.proportions" value="0.2" />
|
|
34
95
|
<property name="options.searchVisible" value="true" />
|
|
96
|
+
<property name="options.splitter.details.proportions" value="0.2" />
|
|
97
|
+
<property name="options.splitter.main.proportions" value="0.3" />
|
|
98
|
+
</component>
|
|
99
|
+
<component name="RunDashboard">
|
|
100
|
+
<option name="ruleStates">
|
|
101
|
+
<list>
|
|
102
|
+
<RuleState>
|
|
103
|
+
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
|
104
|
+
</RuleState>
|
|
105
|
+
<RuleState>
|
|
106
|
+
<option name="name" value="StatusDashboardGroupingRule" />
|
|
107
|
+
</RuleState>
|
|
108
|
+
</list>
|
|
109
|
+
</option>
|
|
35
110
|
</component>
|
|
36
|
-
<component name="
|
|
37
|
-
<
|
|
111
|
+
<component name="SvnConfiguration">
|
|
112
|
+
<configuration />
|
|
38
113
|
</component>
|
|
39
|
-
<component name="ShelveChangesManager" show_recycled="false" />
|
|
40
114
|
<component name="TaskManager">
|
|
41
|
-
<task active="true" id="Default" summary="Default task"
|
|
115
|
+
<task active="true" id="Default" summary="Default task">
|
|
116
|
+
<changelist id="8c663ecd-d50c-4d78-b11a-ad11c976969c" name="Default Changelist" comment="" />
|
|
117
|
+
<created>1567896209904</created>
|
|
118
|
+
<option name="number" value="Default" />
|
|
119
|
+
<option name="presentableId" value="Default" />
|
|
120
|
+
<updated>1567896209904</updated>
|
|
121
|
+
<workItem from="1567895793615" duration="362000" />
|
|
122
|
+
</task>
|
|
42
123
|
<servers />
|
|
43
124
|
</component>
|
|
44
|
-
<component name="
|
|
45
|
-
<option name="
|
|
125
|
+
<component name="TimeTrackingManager">
|
|
126
|
+
<option name="totallyTimeSpent" value="362000" />
|
|
46
127
|
</component>
|
|
47
|
-
<component name="
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
128
|
+
<component name="ToolWindowManager">
|
|
129
|
+
<frame x="0" y="23" width="1920" height="1027" extended-state="0" />
|
|
130
|
+
<editor active="true" />
|
|
131
|
+
<layout>
|
|
132
|
+
<window_info id="Learn" />
|
|
133
|
+
<window_info id="Favorites" side_tool="true" />
|
|
134
|
+
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24973376" />
|
|
135
|
+
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
|
136
|
+
<window_info anchor="bottom" id="Docker" show_stripe_button="false" />
|
|
137
|
+
<window_info anchor="bottom" id="Database Changes" />
|
|
138
|
+
<window_info anchor="bottom" id="Version Control" />
|
|
139
|
+
<window_info anchor="bottom" id="Terminal" />
|
|
140
|
+
<window_info anchor="bottom" id="Event Log" side_tool="true" />
|
|
141
|
+
<window_info anchor="bottom" id="Message" order="0" />
|
|
142
|
+
<window_info anchor="bottom" id="Find" order="1" />
|
|
143
|
+
<window_info anchor="bottom" id="Run" order="2" />
|
|
144
|
+
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
|
145
|
+
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
|
146
|
+
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
|
147
|
+
<window_info anchor="bottom" id="TODO" order="6" />
|
|
148
|
+
<window_info anchor="right" id="Database" />
|
|
149
|
+
<window_info anchor="right" id="Commander" order="0" weight="0.4" />
|
|
150
|
+
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
|
151
|
+
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
|
152
|
+
</layout>
|
|
153
|
+
</component>
|
|
154
|
+
<component name="TypeScriptGeneratedFilesManager">
|
|
155
|
+
<option name="version" value="1" />
|
|
51
156
|
</component>
|
|
52
|
-
<component name="
|
|
53
|
-
<
|
|
157
|
+
<component name="editorHistoryManager">
|
|
158
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
|
159
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
160
|
+
<state relative-caret-position="90">
|
|
161
|
+
<caret line="6" lean-forward="true" selection-start-line="6" selection-end-line="6" />
|
|
162
|
+
</state>
|
|
163
|
+
</provider>
|
|
164
|
+
</entry>
|
|
165
|
+
<entry file="file://$PROJECT_DIR$/lib/md_simple_editor/version.rb">
|
|
166
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
167
|
+
<state relative-caret-position="45">
|
|
168
|
+
<caret line="3" lean-forward="true" selection-start-line="3" selection-end-line="3" />
|
|
169
|
+
</state>
|
|
170
|
+
</provider>
|
|
171
|
+
</entry>
|
|
172
|
+
<entry file="file://$PROJECT_DIR$/md_simple_editor.gemspec">
|
|
173
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
174
|
+
<state relative-caret-position="405">
|
|
175
|
+
<caret line="27" lean-forward="true" selection-start-line="27" selection-end-line="27" />
|
|
176
|
+
</state>
|
|
177
|
+
</provider>
|
|
178
|
+
</entry>
|
|
54
179
|
</component>
|
|
55
|
-
</project>
|
|
56
|
-
|
|
180
|
+
</project>
|
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Add this line to your application's Gemfile:
|
|
8
8
|
|
|
9
|
-
gem
|
|
9
|
+
gem 'font-awesome-rails'
|
|
10
10
|
gem 'md_simple_editor'
|
|
11
11
|
|
|
12
12
|
And then execute:
|
|
@@ -15,15 +15,20 @@ And then execute:
|
|
|
15
15
|
|
|
16
16
|
Or install it yourself as:
|
|
17
17
|
|
|
18
|
-
$ gem install font-awesome-rails
|
|
18
|
+
$ gem install font-awesome-rails
|
|
19
19
|
$ gem install md_simple_editor
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
23
|
In your `application.css`, include the css files:
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
*= require font-awesome
|
|
26
26
|
*= require md_simple_editor
|
|
27
|
+
|
|
28
|
+
Or if you using SCSS, include in `application.css.scss`:
|
|
29
|
+
|
|
30
|
+
@import "font-awesome";
|
|
31
|
+
@import "md_simple_editor";
|
|
27
32
|
|
|
28
33
|
In your `application.js`, include the javascript files:
|
|
29
34
|
|
|
@@ -46,7 +51,12 @@ Also you can use inside a form
|
|
|
46
51
|
<% end %>
|
|
47
52
|
<% end %>
|
|
48
53
|
```
|
|
49
|
-
|
|
54
|
+
You can change the size of the buttons using bootstrap classes `btn-sm`, `btn-xs`, `btn-lg`
|
|
55
|
+
```rails
|
|
56
|
+
<%= md_simple_editor('btn-xs') do %>
|
|
57
|
+
<%= text_area_tag "your id" %>
|
|
58
|
+
<% end %>
|
|
59
|
+
```
|
|
50
60
|
|
|
51
61
|
#### Version 0.1.8
|
|
52
62
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class MdSimpleEditorController < ApplicationController
|
|
2
2
|
def preview
|
|
3
|
-
options = {autolink: true, tables: true, hard_wrap: true, no_intra_emphasis: true,
|
|
3
|
+
options = {autolink: true, tables: true, hard_wrap: true, no_intra_emphasis: true, fenced_code_blocks: true, gh_blockcode: true}
|
|
4
4
|
html = Redcarpet::Markdown.new(Redcarpet::Render::HTML, options).render(params['md']).html_safe
|
|
5
5
|
render html: html
|
|
6
6
|
end
|
data/md_simple_editor.gemspec
CHANGED
|
@@ -18,10 +18,10 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
19
|
spec.require_paths = ['lib']
|
|
20
20
|
|
|
21
|
-
spec.add_development_dependency 'bundler', '
|
|
21
|
+
spec.add_development_dependency 'bundler', '>= 1.3'
|
|
22
22
|
spec.add_development_dependency 'rake'
|
|
23
23
|
|
|
24
24
|
spec.add_runtime_dependency 'font-awesome-rails'
|
|
25
25
|
spec.add_runtime_dependency 'redcarpet', '~> 3.4'
|
|
26
|
-
spec.add_runtime_dependency 'bootstrap-sass', '
|
|
26
|
+
spec.add_runtime_dependency 'bootstrap-sass', '>= 3.3.7'
|
|
27
27
|
end
|
metadata
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: md_simple_editor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ruben Espinosa
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-09-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '1.3'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - "
|
|
24
|
+
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '1.3'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
@@ -70,14 +70,14 @@ dependencies:
|
|
|
70
70
|
name: bootstrap-sass
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- - "
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: 3.3.7
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- - "
|
|
80
|
+
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: 3.3.7
|
|
83
83
|
description: Simple editor for markdown and rails
|
|
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
132
132
|
version: '0'
|
|
133
133
|
requirements: []
|
|
134
134
|
rubyforge_project:
|
|
135
|
-
rubygems_version: 2.
|
|
135
|
+
rubygems_version: 2.5.2.3
|
|
136
136
|
signing_key:
|
|
137
137
|
specification_version: 4
|
|
138
138
|
summary: Simple editor for markdown and rails
|