百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
B

bootsy

> 后端框架
开源

免责声明: 此项目不再维护。

445 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

免责声明: 此项目不再维护。

Bootsy

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

  • bootsy-demo.herokuapp.com

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:


  
  

  
  

  

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 
  

  

  

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:

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:

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 tag. You can set the locale directly by setting a `data-bootsy-locale` attribute on your.

License

MIT License. Copyright 2012-2017 Volmer Campos Soares

Issues· 6 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubybootstraprailswysiwyg-editor

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架