Drupal的可视化(WYSIWYG)编辑器一直是不太好用,虽然装了一个FCKeditor,感觉还是比较复杂。我还是喜欢WordPress的编辑器,但是还没有找到类似的模块。 在文章中插入图片显得比较困难,我选择使用Drupal的Insert模块来插入CCK的ImageField图片。 图片或文件存成ImageField有几个好处: 1.管理比较方便,图片的存储可以通过CCK来指定,可以自定义图片标题(Title)和图片(alt)的内容。 2.容易扩展,CCK的扩展模块很多,如可以通过Fancy Slide模块实现图片滚动效果。 Insert模块使用方法: 1. 下载并安装Insert模块 下载地址: http://drupal.org/project/insert 将Insert模块解压缩至 drupal-dir/sites/all/modules/ 目录下。 在Drupal模块列表中启用该模块。 2. 配置Insert模块 Insert模块没有单独的配置页面,要配置Insert需要在CCK field中进行设置。 在Filefield类型的下有Insert的配置: ![Drupal Insert模块配置设置 Drupal Insert模块配置设置](http://truevue.org/sites/default/files/imagecache/512/files/2010/02/drupal-insert-usage-1.gif) 配置好之后可以在上传图片或文件后点击旁边的Insert按钮将图片或文件按照指定的格式插入到编辑框中: ![Drupal Insert模块使用方法 Drupal Insert模块使用方法](http://truevue.org/sites/default/files/imagecache/512/files/2010/02/drupal-insert-usage-2.gif)
本文选自:东华博客,谢谢!* _2 O/ a6 ~3 p+ i# l4 k% g! u7 A
---------------------------------------------------------------------------------------------------------------------------
InsertInsert is a utility that makes inserting images and links to files into text areas or WYSIWYGs much easier. It adds a simple JavaScript-based button to FileField and ImageField widgets. When used with ImageField and ImageCache, images may be inserted into text areas with a specific ImageCache preset. Insert插入是一种实用工具,使插入图片和链接文件到文本区域或WYSIWYGs 更容易。
; h1 ]" q# [/ B5 e+ K! DFileField字段和ImageField的部件,它增加了一个简单的基于JavaScript的按钮。
- c3 t4 k g% ^& {- hImageField的和ImageCache使用时,图像可能会被插入到文本区域与特定ImageCache预设。 This module was previously known as FileField Insert. 该模块以前被称为FileField Insert模块。 Features - Support for all major WYSIWYG editors, including tinyMCE,CKeditor, the WYSIWYG project (the recommended approach), and plain text areas.
- Insert images using ImageCache presets
- Maximum width setting for inserted images (for combined use with the Image Resize Filter module)
- Per-field insert configuration
See this module in action in the excellent FileField Insert / Image Resize Filter screencast byMustardSeed Media. Requirements - CCK (2.5 or higher! D6 only.)
Recommended projects Insert doesn't do much without FileField or some other supporting module installed. The following all work well with Insert: Note in Drupal 7, all these modules are built into core. This D7 porting of this module brought to you by the 2011 Webchick Tour! |