(一)文件类型的控制
此处只是演示图片类型的控制,其它的控制需要查看WebRoot/fckeditor/editor/dialog/下面对应的 js文件
fckeditor.properties写法参考fckeditor-java-core-2.4.1.jar/net.fckeditor.handlers/net.fckeditor.handlers/default.properties文件
myconfig.js写法参考WebRoot/fckeditor/fckconfig.js文件
如果想添加一种新的图片类型如.abc,修改方式如下:
此处只是演示图片类型的控制,其它的控制需要查看WebRoot/fckeditor/editor/dialog/下面对应的 js文件
fckeditor.properties写法参考fckeditor-java-core-2.4.1.jar/net.fckeditor.handlers/net.fckeditor.handlers/default.properties文件
myconfig.js写法参考WebRoot/fckeditor/fckconfig.js文件
如果想添加一种新的图片类型如.abc,修改方式如下:
复制内容到剪贴板 程序代码
在fckeditor.properties添加属性connector.resourceType.image.extensions.allowed = bmp|gif|jpeg|jpg|png|abc
在myconfig.js中添加FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp|abc)$" ;
在myconfig.js中添加FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp|abc)$" ;
Tags: FCK
<script type="text/javascript" src="../../fckeditor.js"></script>
复制内容到剪贴板 程序代码
1// FCKeditor_OnComplete is a special function that is called when an editor
2// instance is loaded ad available to the API. It must be named exactly in
3// this way.
4function FCKeditor_OnComplete( editorInstance )
5{
6 // Show the editor name and description in the browser status bar.
7 document.getElementById('eMessage').innerHTML = 'Instance "' + editorInstance.Name + '" loaded - ' + editorInstance.Description ;
2// instance is loaded ad available to the API. It must be named exactly in
3// this way.
4function FCKeditor_OnComplete( editorInstance )
5{
6 // Show the editor name and description in the browser status bar.
7 document.getElementById('eMessage').innerHTML = 'Instance "' + editorInstance.Name + '" loaded - ' + editorInstance.Description ;
Tags: FCKe