Archive

Archive for the ‘整站程序’ Category

FCKeditor的工具栏调用

March 7th, 2008 No comments

是用FCKeditor后可以发现实际上是产生了一个iframe
而这个iframe指向一个FCK组件的html地址
如果不使用对象方式来产生fck编辑器,而是仿造iframe及上面的写法也是可以产生FCK编辑器的
但是这样一来,对用户设置的限制工具栏的作用就没有了
按照下面的方式调用
<iframe id="FCKeditor1___Frame"
        src="/fckeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=Default"
        width="100%" height="200" frameborder="0" scrolling="no">
</iframe>
可以获得所有的工具栏

Categories: 整站程序 Tags:

tinymce中文字体过小解决方法

March 7th, 2008 No comments

      tinymce不管哪个版本,中文的默认字体都是太小了,编辑了保存以后再拿出来还莫名其妙的变的很大。

      解决方案js\themes\advanced\css\editor_content.css中的
 

body, td, pre {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 12px;
}

10px改为12px就可以了。

 

Categories: 整站程序 Tags:

cms有很大一部分在编辑器

March 4th, 2008 No comments

上个学期和xbodhi谈过一次,关于文字排版的问题。文字排版是细节,在seo中起着不小的作用。做ecms有两年的时间了,考虑给他换个编辑器,有两个选择tinymce和fck,这两个都符合xhml。个人比较喜欢tinymce,插件接口比较规范,加载速度快。但是扩展特麻烦,一个上传认证弄了一个星期,还是没有起色。做插件还有一个就是麻烦,要符合他的接口。fck相比要好些,还有一个我选择tiny是因为他看着更顺眼一些。国外的tiny占主流。

Categories: 整站程序 Tags:

TextPattern标签地址

February 28th, 2008 No comments
Categories: 整站程序 Tags:

fck整合ecms的考虑

February 26th, 2008 No comments

 将ecms中的AddNews.php的

“//html编辑器”和“//强制签发权限”中的部分注释掉

就是用/**/括起来

找到</head>在他的上面加上

<!–fck–>
<script type="text/javascript" src="/e/admin/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'newstext' ) ;
oFCKeditor.BasePath = "/e/admin/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
<!–/fck–>

这就ok了

还有就是将fck放到admin文件夹下,注意fck有自己的上传组件,我对他们还没有验证的控制,可以自己删除,随后我会处理。

本整合只是js整合

下载地址

FCKeditor 2.5.1 (Latest Stable)

ZIP File (source code included):
FCKeditor_2.5.1.zip
GZip File (source code included):
FCKeditor_2.5.1.tar.gz

 

下面的比较简单阿js整合

 http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Integration/JavaScript

1加载fck

<script type="text/javascript" src="fckeditor/fckeditor.js"></script>

2调用 

The TEXTAREA replacement method:

In <HEAD> add the "onload" method:

<script type="text/javascript"> window.onload = function() { var oFCKeditor = new FCKeditor( 'MyTextarea' ) ; oFCKeditor.BasePath = "/fckeditor/" ; oFCKeditor.ReplaceTextarea() ; } </script> 

In <BODY> add the below code to replace an existing TEXTAREA in the page:

<textarea id="MyTextarea" name="MyTextarea">This is <b>the</b> initial value.</textarea> 
今天试验了一下php整合,改了一点代码成功了。
工具栏添加,找到一篇好文章。
http://www.javaeye.com/topic/150487
Categories: 整站程序 Tags: ,