This gem integrates Medium Editor Tables Plugin with Rails asset pipeline.
The latest version of plugin bundled by this gem is v0.6.1
Include medium-editor-tables-plugin in your Rails project's Gemfile:
gem 'medium-editor'
gem 'medium-editor-tables-plugin'Include javascript file in app/assets/javascripts/application.js:
//= require medium-editor
//= require medium-editor-tables-pluginInclude stylesheet file in app/assets/stylesheets/application.css:
/*
*= require medium-editor
*= require medium-editor-tables-plugin
*/Initialize Medium Editor and add Tables Plugin inside configuration:
<div class="editable"></div>
<script>
$(document).ready(function(){
var editor = new MediumEditor('.editable', {
buttonLabels: 'fontawesome',
toolbar: {
buttons: [
'bold',
'italic',
'table'
]
},
extensions: {
table: new MediumEditorTable()
}
});
});
</script>- Fork it ( https://github.com/mwlang/medium-editor-tables-plugin/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request