本文介绍了未加载 Rails 应用程序中的 Bootsy WYSIWYG 输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

检查后,所有 bootsy 资产似乎都在加载:JS、CSS 和 text-area=bootsy 显示在目标部分 [section 1] 上.我在初始化程序中启用了基本功能,并在我的模型中包含了 bootsy 容器.Bootsy 根本没有出现,需要帮助了解原因.这是我所拥有的:

Upon inspecting, all bootsy assets seem to be loading: JS, CSS and text-area=bootsy shows on the section targeted [section 1]. I have enabled basic features in the initializer and included bootsy container in my model. Bootsy is not showing up at all, and need help seeing why that is. Here is what I've got:

版本:Ruby 2.1.2,Rails 4.1

Versions:Ruby 2.1.2, Rails 4.1

模型

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

查看:_form.html.erb

View: _form.html.erb

<%= casein_text_area f, f.object, :section_1, as: :bootsy %>

HTML 输出:

 <textarea as="bootsy" class="form-control" id="about_section_1" name="about[section_1]">
 Hello Lorem Ipsum
 </textarea>

正在加载的文件:

/assets/bootsy/bootstrap-wysihtml5.css?body=1/assets/bootsy/bootsy.css?body=1"/assets/bootsy/wysihtml5.js?body=1"/assets/bootsy/bootstrap-wysihtml5.js?body=1"/assets/bootsy/bootsy.js?body=1"/assets/bootsy/bootstrap.file-input.js?body=1/assets/bootsy/init.js/assets/bootsy/editor_options.js/assets/bootsy/translations.js?body=1/assets/bootsy.js?body=1

/assets/bootsy/bootstrap-wysihtml5.css?body=1/assets/bootsy/bootsy.css?body=1" /assets/bootsy/wysihtml5.js?body=1"/assets/bootsy/bootstrap-wysihtml5.js?body=1"/assets/bootsy/bootsy.js?body=1"/assets/bootsy/bootstrap.file-input.js?body=1/assets/bootsy/init.js/assets/bootsy/editor_options.js/assets/bootsy/translations.js?body=1/assets/bootsy.js?body=1

推荐答案

为了让这个工作,我改变了我的观点:

To get this working I changed my view to:

<%= casein_text_area f, f.object, :section_1, class: :bootsy_text_area %>

这篇关于未加载 Rails 应用程序中的 Bootsy WYSIWYG 输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 18:25