328 字2 分钟
FCKeditor 多媒体插件:Media
FCKeditor 应该是在线可视编辑器里的老大了,不但开源、免费,而且跨平台,任何一种语言都可以使用。优点实在太多了,以前写过一篇专门介绍 FCK 的文章,有兴趣的朋友可以研究一下 FCKeditor 详细介绍及下载。
这里介绍一个 FCK 的插件,多媒体插件,支持 Windows Media,Real,QuickTime,Flash,Shockwave,完全可以替换 FCK 自带的 flash 插入功能。
前段时间在发过一篇《利用 Fckeditor 插入 MP3 或视频文件》,是通过修改 FCK 的 Flash 插入实现插入多媒体的,和这里的插件原理是一样的。
插件的具体使用方法如下:
1、解压文件到 FCKeditor\editor\plugins
2、修改配置文件 FCKeditor\fckconfig.js,包括启用插件和添加按钮。
FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ; //找到这一句,配置插件路径 FCKConfig.Plugins.Add( 'Media', 'en,zh,zh-cn' ) ; //启用插件 ………… //中间代码省略 FCKConfig.ToolbarSets["Default"] = [ ['Source','Templates'], ['FontName','FontSize'], ['TextColor','BGColor'], ['Image','Flash'], //可以用Media替换Flash ['Table','Rule'], ['FitWindow','ShowBlocks'], ['Smiley','SpecialChar','Media'], //或者加入Media按钮 '/', ['PasteText','PasteWord','RemoveFormat'], ['Undo','Redo','Find','Replace'], ['Bold','Italic','Underline','StrikeThrough'], ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'], ['JustifyLeft','JustifyCenter','JustifyRight'], ['Anchor','Link','Unlink'] //我的按钮的配置,可能和你的不太一样 ] ;文件下载:media.rar