This repository has been archived by the owner on Dec 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aeeeb04
commit 1428e49
Showing
5 changed files
with
64 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,63 @@ | ||
# Medium::Editor::Rails | ||
# Medium Editor for Rails | ||
|
||
TODO: Write a gem description | ||
This gem integrates [Medium Editor](https://github.com/daviferreira/medium-editor) with Rails asset pipeline. | ||
|
||
## Version | ||
|
||
The latest version of Medium Editor bundled by this gem is [1.5.3](https://github.com/daviferreira/medium-editor/releases) | ||
|
||
## Installation | ||
|
||
Add this line to your application's Gemfile: | ||
Include **medium-editor-rails** in your Rails project's Gemfile: | ||
|
||
gem 'medium-editor-rails' | ||
```ruby | ||
gem 'medium-editor-rails' | ||
``` | ||
|
||
And then execute: | ||
|
||
$ bundle | ||
```bash | ||
$ bundle install | ||
``` | ||
|
||
## Configuration | ||
|
||
Include javascript file in **app/assets/javascripts/application.js**: | ||
|
||
```javascript | ||
//= require medium-edior | ||
``` | ||
|
||
Include stylesheet file on **app/assets/stylesheets/application.css**: | ||
|
||
```scss | ||
*= require medium-editor | ||
``` | ||
|
||
You can also include themes from **themes** folder, example: | ||
|
||
```scss | ||
*= require medium-editor/themes/flat | ||
``` | ||
|
||
## Using Medium Editor with Rails | ||
|
||
You need to initialize Medium Editor with any selector of div, example: | ||
|
||
Or install it yourself as: | ||
```html | ||
<div class="editable"></div> | ||
|
||
$ gem install medium-editor-rails | ||
<script>var editor = new MediumEditor('.editable');</script> | ||
``` | ||
|
||
## Usage | ||
For extra options, visit this page: | ||
|
||
TODO: Write usage instructions here | ||
https://github.com/daviferreira/medium-editor#initialization-options | ||
|
||
## Contributing | ||
|
||
1. Fork it ( http://github.com/<my-github-username>/medium-editor-rails/fork ) | ||
2. Create your feature branch (`git checkout -b my-new-feature`) | ||
3. Commit your changes (`git commit -am 'Add some feature'`) | ||
4. Push to the branch (`git push origin my-new-feature`) | ||
5. Create new Pull Request | ||
5. Create new Pull Request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require "bundler/gem_tasks" | ||
require 'bundler/gem_tasks' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
module MediumEditorRails | ||
module Rails | ||
class Engine < ::Rails::Engine | ||
initializer 'MediumEditorRails precompile hook', :group => :all do |app| | ||
app.config.assets.precompile += %w() | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module MediumEditorRails | ||
module Rails | ||
VERSION = "0.0.1" | ||
MEDIUM_EDITOR_VERSION = "" | ||
VERSION = '0.1.0' | ||
MEDIUM_EDITOR_VERSION = '1.5.3' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,21 +3,23 @@ lib = File.expand_path('../lib', __FILE__) | |
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'medium-editor-rails/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "medium-editor-rails" | ||
spec.version = MediumEditorRails::Rails::VERSION | ||
spec.authors = ["Ahmet Sezgin Duran"] | ||
spec.email = ["[email protected]"] | ||
spec.summary = %q{TODO: Write a short summary. Required.} | ||
spec.description = %q{TODO: Write a longer description. Optional.} | ||
spec.homepage = "" | ||
spec.license = "MIT" | ||
Gem::Specification.new do |s| | ||
s.name = 'medium-editor-rails' | ||
s.version = MediumEditorRails::Rails::VERSION | ||
s.authors = ['Ahmet Sezgin Duran'] | ||
s.email = ['[email protected]'] | ||
s.summary = %q{Medium Editor integrated in Rails asset pipeline} | ||
s.description = s.summary | ||
s.homepage = 'https://github.com/marjinal1st/medium-editor-rails' | ||
s.license = 'MIT' | ||
|
||
spec.files = `git ls-files`.split($/) | ||
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } | ||
spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) | ||
spec.require_paths = ["lib"] | ||
s.files = `git ls-files`.split($/) | ||
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) } | ||
s.test_files = s.files.grep(%r{^(test|spec|features)/}) | ||
s.require_paths = ['lib'] | ||
|
||
spec.add_development_dependency "bundler", "~> 1.5" | ||
spec.add_development_dependency "rake" | ||
s.add_dependency 'rails', '> 3.1' | ||
|
||
s.add_development_dependency 'bundler', '~> 1.5' | ||
s.add_development_dependency 'rake' | ||
end |