All Projects → volmer → Bootsy

volmer / Bootsy

Licence: mit
Disclaimer: this project is no longer maintained.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Bootsy

Tabler Rubygem
Rubygem for https://tabler.github.io
Stars: ✭ 77 (-83.08%)
Mutual labels:  rails, bootstrap
Redmine bootstrap kit
A Redmine plugin which makes developing your own Redmine plugin easy ;)
Stars: ✭ 36 (-92.09%)
Mutual labels:  rails, bootstrap
Bh
Bootstrap Helpers for Ruby
Stars: ✭ 834 (+83.3%)
Mutual labels:  rails, bootstrap
Mercury
Mercury Editor: The Rails WYSIWYG editor that allows embedding full page editing capabilities directly inline.
Stars: ✭ 2,629 (+477.8%)
Mutual labels:  rails, wysiwyg-editor
X Editable Rails
Edit fields easily with X-Editable helper
Stars: ✭ 159 (-65.05%)
Mutual labels:  rails, bootstrap
Instuigram
🎓 Learning Ruby on Rails through building the Instagram Application.
Stars: ✭ 88 (-80.66%)
Mutual labels:  rails, bootstrap
Milog
Milog 是一基于 Ruby on Rails 的个人博客网站
Stars: ✭ 24 (-94.73%)
Mutual labels:  rails, bootstrap
Bootstrap form
Official repository of the bootstrap_form gem, a Rails form builder that makes it super easy to create beautiful-looking forms using Bootstrap 5.
Stars: ✭ 1,532 (+236.7%)
Mutual labels:  rails, bootstrap
Ruby2 Rails4 Bootstrap Heroku
A starter application based on Ruby 2.4, Rails 4.2 and Bootstrap for Sass 3, deployable on Heroku
Stars: ✭ 181 (-60.22%)
Mutual labels:  rails, bootstrap
Pagy
🏆 The Best Pagination Ruby Gem 🥇
Stars: ✭ 3,340 (+634.07%)
Mutual labels:  rails, bootstrap
Angular Editor
A simple native WYSIWYG editor component for Angular 6 -10+
Stars: ✭ 428 (-5.93%)
Mutual labels:  wysiwyg-editor
Bootstrap V4 Rtl
RTL edition of bootstrap v4 for rtl languages like Farsi and Arabic
Stars: ✭ 430 (-5.49%)
Mutual labels:  bootstrap
Bootstrap Submenu
Bootstrap sub-menus
Stars: ✭ 442 (-2.86%)
Mutual labels:  bootstrap
React Quill
A Quill component for React.
Stars: ✭ 4,739 (+941.54%)
Mutual labels:  wysiwyg-editor
Octobox
📮Untangle your GitHub Notifications
Stars: ✭ 4,137 (+809.23%)
Mutual labels:  rails
Bootstrap Flask
Bootstrap 4 helper for Flask/Jinja2.
Stars: ✭ 441 (-3.08%)
Mutual labels:  bootstrap
Django Markdown Editor
Awesome Django Markdown Editor, supported for Bootstrap & Semantic-UI
Stars: ✭ 423 (-7.03%)
Mutual labels:  bootstrap
Rambulance
Simple and safe way to dynamically render error pages or JSON responses for Rails apps
Stars: ✭ 423 (-7.03%)
Mutual labels:  rails
Icons
Official open source SVG icon library for Bootstrap.
Stars: ✭ 5,735 (+1160.44%)
Mutual labels:  bootstrap
Mdb Ui Kit
Bootstrap 5 & Material Design 2.0 UI KIT
Stars: ✭ 21,830 (+4697.8%)
Mutual labels:  bootstrap

Bootsy

Gem Version Build Status

Disclaimer: this project is no longer maintained.

Bootsy is a WYSIWYG editor for Rails based on Bootstrap-wysihtml5 with image uploads using CarrierWave.

Live demo

Requirements

  • Rails 5.
  • ImageMagick or GraphicsMagick (for MiniMagick).
  • Bootstrap 3 fully installed in your app.

Installation

  1. Add Bootsy to your Gemfile and bundle install it:
gem 'bootsy'
bundle install
  1. Mount Bootsy at the beginning of your config/routes.rb:
Rails.application.routes.draw do
  mount Bootsy::Engine => '/bootsy', as: 'bootsy'

  ...

end
  1. Require Bootsy in the asset pipeline:

In your app/assets/javascripts/application.js, put this after requiring jQuery and Bootstrap:

//= require bootsy

In your app/assets/stylesheets/application.css, put this line after requiring Bootstrap:

*= require bootsy
  1. Add and run migrations:
bundle exec rake bootsy:install:migrations
bundle exec rake db:migrate

Usage

Just call bootsy_area in your FormBuilder instances, the same way you'd call textarea. Example:

<%= form_for(@post) do |f| %>
  <%= f.label :title %>
  <%= f.text_field :title %>

  <%= f.label :content %>
  <%= f.bootsy_area :content %>

  <%= f.submit %>
<% end %>

Bootsy will group the uploaded images as galleries and associate them to one of your models. For instance, if you have a Post model and you want to use bootsy_area with it, you must include the Bootsy::Container module:

class Post < ActiveRecord::Base
  include Bootsy::Container
end

Don't forget to ensure the association between your model objects with Bootsy image galleries. For strong_parameters, you must whitelist the bootsy_image_gallery_id parameter in your controller:

private

def post_params
  params.require(:post).permit(:title, :content, :bootsy_image_gallery_id)
end

Bootsy with Simple Form builders

You can use bootsy as an input type in SimpleForm::FormBuilder instances. Example:

<%= simple_form_for @post do |f| %>
  <%= f.input :title %>

  <%= f.input :content, as: :bootsy %>

  <%= f.button :submit %>
<% end %>

Editor options

You can customize Bootsy through a hash of editor_options:

Enable/disable features

You can enable and disable features as you like. For instance, if you don't want link and color features:

<%= f.bootsy_area :my_attribute, editor_options: { link: false, color: false } %>

Available options are: :blockquote, :font_styles, :emphasis, :lists, :html, :link, :image and :color.

Alert of unsaved changes

By default Bootsy alerts the user about unsaved changes if the page is closed or reloaded. You can disable this feature with:

<%= f.bootsy_area :my_attribute, editor_options: { alert_unsaved: false } %>

Uploads

If you don't want to have image uploads, just call bootsy_area in a form builder not associated to a Bootsy::Container model. This way users will still be able to insert images in the text area using an external image URL.

Configuration

You can set the default editor options, image sizes available (small, medium, large and/or its original), dimensions and more. Create a copy of Bootsy's initalizer file in your config/initializers and feel free to uncomment and change the options as you like.

I18n

You can translate Bootsy to your own language. Simply create a locale file for it in your config/locales directory similar to Bootsy's master English file.

You also need to translate Bootsy on the JavaScript side. Just follow this example. Bootsy will try to guess the locale based on the lang attribute of the page's <html> tag. You can set the locale directly by setting a data-bootsy-locale attribute on your <textarea>.

License

MIT License. Copyright 2012-2017 Volmer Campos Soares

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].