动易CMS静态页调用FCK编辑器的代码

动易CMS静态页调用FCK编辑器的代码,第1张

概述网(LieHuo.Net)教程 最近有用户想实现AJAX写库,前台的文本框想替换成FCK编辑器,现在给出静态页调用FCK的一个参考例子,有兴趣的用户可以参考一下: 以下为引用的内容:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:…

  内存溢出 jb51.cc 最近有用户想实现AJAX写库,前台的文本框想替换成FCK编辑器,现在给出静态页调用FCK的一个参考例子,有兴趣的用户可以参考一下:

以下为引用的内容:
<!DOCTYPE HTML PUBliC "-//W3C//DTD xhtml 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head>
<Title>FCKeditor - Sample - LIEHUO.NET</Title>
<Meta http-equiv="Content-Type" content="text/HTML; charset=utf-8" />
<Meta name="robots" content="noindex,nofollow" />
<link href="../sample.CSS" rel="stylesheet" type="text/CSS" />
<script type="text/JavaScript" src="fckeditor/fckeditor.Js"></script>//修改为自己的src
<script type="text/JavaScript">
window.onload = function()
{
// automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = "./fckeditor/" ;//这里修改为你网站的fck编辑器文件夹的相对路径
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.ReplaceTextarea() ;
}

function btnclick()
{
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;

// Get the editor contents in xhtml.
alert( oEditor.Getxhtml( true ) ) ; // "true" means you want it formatted.获取fck编辑器的值的方法

}

</script>
</head>
<body>
<div>
<textarea name="FCKeditor1" rows="10" cols="80" style="wIDth: 100%; height: 200px">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://www.fckeditor.net/"&gt;FCKeditor&lt;/a&gt;.&lt;/p&gt;</textarea>
</div>
<br />
<input ID="btn" type="button" value="get content" onclick="btnclick()"/>

</body>
</HTML>

总结

以上是内存溢出为你收集整理的动易CMS静态页调用FCK编辑器的代码全部内容,希望文章能够帮你解决动易CMS静态页调用FCK编辑器的代码所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zz/998658.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存