- 浏览: 2072560 次
- 性别:
- 来自: NYC
文章分类
- 全部博客 (628)
- Linux (53)
- RubyOnRails (294)
- HTML (8)
- 手册指南 (5)
- Mysql (14)
- PHP (3)
- Rails 汇总 (13)
- 读书 (22)
- plugin 插件介绍与应用 (12)
- Flex (2)
- Ruby技巧 (7)
- Gem包介绍 (1)
- javascript Jquery ext prototype (21)
- IT生活 (6)
- 小工具 (4)
- PHP 部署 drupal (1)
- javascript Jquery sort plugin 插件 (2)
- iphone siri ios (1)
- Ruby On Rails (106)
- 编程概念 (1)
- Unit Test (4)
- Ruby 1.9 (24)
- rake (1)
- Postgresql (6)
- ruby (5)
- respond_to? (1)
- method_missing (1)
- git (8)
- Rspec (1)
- ios (1)
- jquery (1)
- Sinatra (1)
最新评论
-
dadadada2x:
user模型里加上 protected def email ...
流行的权限管理 gem devise的定制 -
Sev7en_jun:
shrekting 写道var pattern = /^(0| ...
强悍的ip格式 正则表达式验证 -
jiasanshou:
好文章!!!
RPM包rpmbuild SPEC文件深度说明 -
寻得乐中乐:
link_to其实就是个a标签,使用css控制,添加一个参数: ...
Rails在link_to中加参数 -
aiafei0001:
完全看不懂,不知所然.能表达清楚一点?
"$ is not defined" 的问题怎么办
Easy FCKEditor Rails plugin
=======
Gastón Ramos
ramos.gaston [at] gmail [dot] com
http://gastonramos.wordpress.com/
Easy FCKEditor is a Rails Plugin thats generate a WYSIWYG text editor helper. This version is a fork of Scott Rutherford [great plugin](http://blog.caronsoftware.com/2007/11/16/fckeditor-plugin-0-4-2-released) with a [EasyUpload plugin](http://martinezdelizarrondo.com/easyupload/) inlcuded of Alfonso Martínez de Lizarrondo.
This plugin installs the FCKeditor editor into your rails app, along with some helpers to use in your views.
Features
====
WYSIWYG text editor helper.
2 configurable versions of upload images module (easy and complete).
Easy link maker.
Versions
====
This plugin is tested with:
Rails 2.2 and 2.3
Ruby 1.8.6 Patchlevel 114
FCKeditor 2.6.3
Install
===
If you got this using:
ruby script/plugin install git://github.com/gramos/easy-fckeditor.git
Then the install should of copied all the appropriate files to their homes. If you download a tar then you can either do
rake fckeditor:install
from the root of your app, or the file will be installed the first time you startup after untaring the plugin.
Uninstall
=====
Then the install should run task:
rake fckeditor:uninstall
and all the installed files will be removed.
Files
=
Basically the whole of the FCKeditor suite is copied to: public/javascripts/fckeditor
There is a separate config file copied to: public/javascripts/fckcustom.js, that you can use to customize the install. This file is never overriden by upgrades or reinstalls
IMPORTANT
=====
If you are hosting your rails app in a subdirectory you need to open:
public/javascripts/fckcustom.js
and modify the FCKRelativePath = ’’; to suite your needs.
For example if I have an app at www.mydomain.com/app/
then the line should read:
FCKRelativePath = ‘/app’;
Usage
=
Basically include this in the page you wish to use the editor in
<%= javascript_include_tag :fckeditor %>
Then instead of the normal textarea helper from Rails use this one
<% = fckeditor_textarea(“object”, “field”, :toolbarSet => ‘Simple’, :width => ‘100%’, :height => ‘200px’) %>
and for use Easy toolbar with EasyUpload plugin
<% = fckeditor_textarea(“object”, “field”, :toolbarSet => ‘Easy’, :width => ‘100%’, :height => ‘200px’) %>
Thats it unless you are using AJAX
AJAX
====
To use a remote form you need to do something like this
<%= form_remote_tag :url => @options.merge(:controller => @scaffold_controller), :before => fckeditor_before_js(‘note’, ‘text’) %> <%= fckeditor_textarea( “note”, “text”, :ajax => true ) %> <%= end_form_tag %>
If you forget to put in the :before it won’t work, you can also use the fckeditor_form_remote_tag described below
Multiple Editors in a form
======
To create a form using multiple editors use the fckeditor_form_remote_tag helper and pass the :editors option. This takes an hash of model symbol keys with each having
an array as its value. The array should contain the list of fields that will have editors attached to them.
<%= fckeditor_form_remote_tag :url => @options.merge(:controller => @scaffold_controller), :editors => { :multinote => [‘text1’, ‘text2’] } %> <%= fckeditor_textarea( “multinote”, “text1”, :ajax => true ) %> <%= fckeditor_textarea( “multinote”, “text2”, :ajax => true ) %> <%= end_form_tag %>
There is also a fckeditor_remote_form_for version.
Spell Check
===
Basically ensure you have aspell installed and available in your path. If running on Windows then the expected install path is:
‘c:\program files\aspell\bin\aspell’
If you install elsewhere then you will need to update spell_check.rb in the plugin to mirror your path. Also make sure you have this line in your fckcustom.js file:
FCKConfig.SpellChecker = ‘SpellerPages’;
Contribute
==
There is a lighthouseapp account if you want to send a patch or report a bug
http://easy_fckeditor.lighthouseapp.com/projects/27883-easy-fckeditor/overview
=======
Gastón Ramos
ramos.gaston [at] gmail [dot] com
http://gastonramos.wordpress.com/
Easy FCKEditor is a Rails Plugin thats generate a WYSIWYG text editor helper. This version is a fork of Scott Rutherford [great plugin](http://blog.caronsoftware.com/2007/11/16/fckeditor-plugin-0-4-2-released) with a [EasyUpload plugin](http://martinezdelizarrondo.com/easyupload/) inlcuded of Alfonso Martínez de Lizarrondo.
This plugin installs the FCKeditor editor into your rails app, along with some helpers to use in your views.
Features
====
WYSIWYG text editor helper.
2 configurable versions of upload images module (easy and complete).
Easy link maker.
Versions
====
This plugin is tested with:
Rails 2.2 and 2.3
Ruby 1.8.6 Patchlevel 114
FCKeditor 2.6.3
Install
===
If you got this using:
ruby script/plugin install git://github.com/gramos/easy-fckeditor.git
Then the install should of copied all the appropriate files to their homes. If you download a tar then you can either do
rake fckeditor:install
from the root of your app, or the file will be installed the first time you startup after untaring the plugin.
Uninstall
=====
Then the install should run task:
rake fckeditor:uninstall
and all the installed files will be removed.
Files
=
Basically the whole of the FCKeditor suite is copied to: public/javascripts/fckeditor
There is a separate config file copied to: public/javascripts/fckcustom.js, that you can use to customize the install. This file is never overriden by upgrades or reinstalls
IMPORTANT
=====
If you are hosting your rails app in a subdirectory you need to open:
public/javascripts/fckcustom.js
and modify the FCKRelativePath = ’’; to suite your needs.
For example if I have an app at www.mydomain.com/app/
then the line should read:
FCKRelativePath = ‘/app’;
Usage
=
Basically include this in the page you wish to use the editor in
<%= javascript_include_tag :fckeditor %>
Then instead of the normal textarea helper from Rails use this one
<% = fckeditor_textarea(“object”, “field”, :toolbarSet => ‘Simple’, :width => ‘100%’, :height => ‘200px’) %>
and for use Easy toolbar with EasyUpload plugin
<% = fckeditor_textarea(“object”, “field”, :toolbarSet => ‘Easy’, :width => ‘100%’, :height => ‘200px’) %>
Thats it unless you are using AJAX
AJAX
====
To use a remote form you need to do something like this
<%= form_remote_tag :url => @options.merge(:controller => @scaffold_controller), :before => fckeditor_before_js(‘note’, ‘text’) %> <%= fckeditor_textarea( “note”, “text”, :ajax => true ) %> <%= end_form_tag %>
If you forget to put in the :before it won’t work, you can also use the fckeditor_form_remote_tag described below
Multiple Editors in a form
======
To create a form using multiple editors use the fckeditor_form_remote_tag helper and pass the :editors option. This takes an hash of model symbol keys with each having
an array as its value. The array should contain the list of fields that will have editors attached to them.
<%= fckeditor_form_remote_tag :url => @options.merge(:controller => @scaffold_controller), :editors => { :multinote => [‘text1’, ‘text2’] } %> <%= fckeditor_textarea( “multinote”, “text1”, :ajax => true ) %> <%= fckeditor_textarea( “multinote”, “text2”, :ajax => true ) %> <%= end_form_tag %>
There is also a fckeditor_remote_form_for version.
Spell Check
===
Basically ensure you have aspell installed and available in your path. If running on Windows then the expected install path is:
‘c:\program files\aspell\bin\aspell’
If you install elsewhere then you will need to update spell_check.rb in the plugin to mirror your path. Also make sure you have this line in your fckcustom.js file:
FCKConfig.SpellChecker = ‘SpellerPages’;
Contribute
==
There is a lighthouseapp account if you want to send a patch or report a bug
http://easy_fckeditor.lighthouseapp.com/projects/27883-easy-fckeditor/overview
发表评论
-
Destroying a Postgres DB on Heroku
2013-04-24 10:58 928heroku pg:reset DATABASE -
VIM ctags setup ack
2012-04-17 22:13 3255reference ctags --extra=+f --e ... -
alias_method_chain方法在3.1以后的替代使用方式
2012-02-04 02:14 3288alias_method_chain() 是rails里的一个 ... -
一些快速解决的问题
2012-01-19 12:35 1470问题如下: 引用Could not open library ... -
API service 安全问题
2011-12-04 08:47 1380这是一个长期关注的课题 rest api Service的 ... -
Module方法调用好不好
2011-11-20 01:58 1344以前说,用module给class加singleton方法,和 ... -
一个ajax和rails交互的例子
2011-11-19 01:53 1903首先,这里用了一个,query信息解析的包,如下 https: ... -
Rails 返回hash给javascript
2011-11-19 01:43 2272这是一个特别的,不太正统的需求, 因为,大部分时候,ajax的 ... -
关于Rubymine
2011-11-18 23:21 2263开个帖子收集有关使用上的问题 前一段时间,看到半价就买了。想 ... -
ruby中和javascript中,动态方法的创建
2011-11-18 21:01 1234class Klass def hello(*args) ... -
textmate快捷键 汇总
2011-11-16 07:20 8138TextMate 列编辑模式 按住 Alt 键,用鼠标选择要 ... -
Ruby面试系列六,面试继续面试
2011-11-15 05:55 2018刚才受到打击了,充分报漏了自己基础不扎实,不肯向虎炮等兄弟学习 ... -
说说sharding
2011-11-13 00:53 1481这个东西一面试就有人 ... -
rails面试碎碎念
2011-11-12 23:51 1939面试继续面试 又有问ru ... -
最通常的git push reject 和non-fast forward是因为
2011-11-12 23:29 17209git push To git@github.com:use ... -
Rails 自身的many to many关系 self has_many
2011-11-12 01:43 2732简单点的 #注意外键在person上people: id ... -
Rails 3下的 in place editor edit in place
2011-11-12 01:20 945第一个版本 http://code.google.com/p ... -
Heroku 的诡异问题集合
2011-11-11 07:22 1692开个Post记录,在用heroku过程中的一些诡异问题和要注意 ... -
SCSS 和 SASS 和 HAML 和CoffeeScript
2011-11-07 07:52 12952Asset Pipeline 提供了内建 ... -
Invalid gemspec because of the date format in specification
2011-11-07 02:14 2115又是这个date format的错误。 上次出错忘了,记录下 ...
相关推荐
**FCKeditor在JSP中的使用详解** FCKeditor是一款流行的开源富文本编辑器,它提供了丰富的文本格式化功能,使用户能够在网页上实现类似Word的编辑体验。在JSP(JavaServer Pages)环境中集成FCKeditor,可以方便地...
标签提到了".net编辑器",这意味着FCKeditor在.NET Framework环境下也有良好的应用。.NET开发者可以利用ASP.NET控件或者JavaScript API将FCKeditor整合到ASP.NET Web应用程序中,为用户提供强大的文本编辑功能。 ...
在.NET框架下集成FckEditor,可以极大地提升用户在Web应用中的编辑体验。下面将详细介绍FckEditor在.NET中的使用步骤和配置方法。 一、安装FckEditor 首先,你需要从FckEditor的官方网站或者通过NuGet包管理器下载...
2. **配置路径**:将FCKeditor的文件夹上传到你的服务器,通常将其放在Web服务器的根目录下或一个子目录中。然后,根据实际项目需求配置编辑器的URL路径。 3. **引入JavaScript文件**:在你的HTML页面中,通过`...
**FCKEditor使用帮助文档** FCKEditor是一款开源的HTML编辑器,主要用于网站内容管理系统(CMS)和论坛等在线文本编辑场景。它以其强大的功能、易于集成和自定义而受到开发者的广泛欢迎。本帮助文档将详细介绍...
以下是对如何在ASP.NET中使用FCKEditor进行详细步骤的概述: 首先,你需要从FCKEditor的官方网站下载最新版本的FCKEditor(包括JavaScript文件)和FCKeditor.Net的ZIP文件(包含DLL)。解压缩这两个文件,以便后续...
**FCKeditor在Asp.net中的使用** FCKeditor是一款著名的开源富文本编辑器,它为Web应用程序提供了功能丰富的文本编辑界面,支持多种浏览器,包括IE、Firefox、Chrome和Safari等。在Asp.net框架下,FCKeditor能够...
【FCKeditor在Java Web程序中的使用】 FCKeditor是一款流行的开源HTML文本编辑器,它为Web应用程序提供了类似Microsoft Word的强大编辑功能。该编辑器支持多种主流浏览器,如Internet Explorer 5.5及以上版本,Fire...
总之,FCKeditor在J2EE项目中的使用配置涉及下载编辑器资源、部署到Web应用、配置Servlet以及在页面中调用编辑器。通过这样的集成,可以提供一个用户友好的界面,使得非技术人员也能方便地编辑和管理HTML内容。
尽管现在已经被CKEditor所取代,但FCKEditor在许多旧项目中仍然广泛使用,因此理解其工作原理和使用方法仍然很重要。 ### 一、FCKEditor简介 FCKeditor是一款基于JavaScript的WYSIWYG(所见即所得)编辑器,允许...
FCKeditor具体设置及使用 FCKeditor是一款功能强大且灵活的在线编辑器,可以帮助开发者轻松实现网页上的富文本编辑功能。下面将详细介绍FCKeditor...这样,FCKeditor就已经配置好了,可以在ASP.NET应用程序中使用了。
FCKeditor for WordPress 插件是将此编辑器集成到WordPress平台的工具,版本3.3.1代表了该插件的一个特定更新,旨在增强用户在WordPress网站上编辑内容的能力。 **核心功能与特点** 1. **富文本编辑**: FCKeditor ...
要在项目中使用FCKeditor,首先需要下载并解压FCKeditor的源代码包。手册中包含的"FCKeditor中文使用手册.exe"可能是安装程序或文档的电子版,用于详细解释安装步骤和配置选项。同时,"说明文件.txt"可能提供了额外...
- 在需要使用编辑器的页面引入FCKeditor的JavaScript文件,通常为`fckeditor.js`。 - 创建一个`<textarea>`标签,FCKeditor会替换该标签以显示编辑界面。 - 调用`FCKeditor.Create()`函数初始化编辑器。 2. **...
在需要使用编辑器的页面中,通过`include`语句引入FCKeditor类。 ```php ("fckeditor/fckeditor.php"); ?> ``` 其中`fckeditor.php`文件路径需要根据实际项目目录结构进行调整。 ##### 2. **初始化FCKeditor...
FCKeditor是一款功能强大的富文本编辑器,广泛应用于网页内容编辑,尤其在Java Web开发中被频繁使用。本文将详细讲解如何在JSP环境中集成并配置FCKeditor,以及实现文件上传和目录浏览功能。 首先,我们需要从...
在Web开发中,FCKeditor是一款非常流行的开源富文本编辑器,尤其在PHP环境下,它被广泛用于创建和编辑内容丰富的网页。FCKeditor提供了用户友好的界面,使得非技术用户也能轻松编辑HTML内容。本文将详细介绍如何在...
**正文** 在Web开发中,富文本编辑器和前端框架的结合使用是常见的需求,以提供用户友好的界面和强大的编辑功能。...这种结合方式在内容管理系统、论坛、博客平台等场景下尤为常见,为用户提供了一流的编辑体验。
本文将详细介绍如何在ASP.NET MVC项目中集成并使用FCKeditor的MVC版本,以及JavaScript操作FCKeditor的一些基本方法。 首先,我们需要了解什么是ASP.NET MVC。ASP.NET MVC是一个模型-视图-控制器(Model-View-...