怎么实现网页html编辑器 LZ使用的是什么语言,可以参考下fck。不过,可以不造轮子,尽量就不要造轮子了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 直接用现成的吧FCK就不错,还开源 是呀,FCKEditor就很不错。不过上网一搜索的话,可以找到很多。没有什么太难的技术。使用JAVASCRIPT就可以了。不过要是自己做个完善的编辑器的话工作量会很大。 http://www.scriptlover.com/controls/?url=/controls/163editor/ 因为我这里要实现的是非常简单的功能而且自己想diy一个再找找吧 用5楼的那个编辑器也可以我记得我有个CSDN的这个编辑器 <!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><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><a href="javascript:addBold()">加粗</a><iframe src="" name= "edit" id="edit" frameborder="1" width="500" height="300" style="border:#000000 1px solid;"></iframe> <script language= "javascript"> var editor = document.getElementById("edit").contentWindow;//这句 editor.document.designMode="On";//这句 editor.document.contentEditable = true; //这句 //兼容Firfox editor.document.open(); editor.document.writeln('<html><body></body></html>'); editor.document.close(); //字体特效 - 加粗方法一 function addBold(){ editor.focus(); editor.document.execCommand("Bold", false, null);//还有这里}//主要的是这几句句,剩下的document.execCommand方法的具体用法你搜下好了</script> </body></html> 使用jquery Ajax方法调用WebService时候url的格式怎么写? 各种需求,各种问~~ 一个截取字符串的问题,大虾帮帮忙(2) ? ff上获取不了数据 请教一个问题,在线等,搞定就给分!!! 怎么判断是一个页面是window.open打开的,还是普通的IE打开的 求一段图片无法显示,用另一张图片替换的JS代码 怎样将字符串0xffffffff转化为16进制数 在js中,有没有类似java中的clone方法?请见 ... 愁!愁!愁!谁来指点: 如何打印? 关于弹出式提式框 本站中提问时,点上传文件弹出的窗口效果
FCK就不错,还开源
不过上网一搜索的话,可以找到很多。
没有什么太难的技术。
使用JAVASCRIPT就可以了。
不过要是自己做个完善的编辑器的话工作量会很大。
而且自己想diy一个
再找找吧
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<a href="javascript:addBold()">加粗</a>
<iframe src="" name= "edit" id="edit" frameborder="1" width="500" height="300" style="border:#000000 1px solid;"></iframe>
<script language= "javascript">
var editor = document.getElementById("edit").contentWindow;//这句
editor.document.designMode="On";//这句
editor.document.contentEditable = true; //这句
//兼容Firfox
editor.document.open();
editor.document.writeln('<html><body></body></html>');
editor.document.close();
//字体特效 - 加粗方法一
function addBold(){
editor.focus();
editor.document.execCommand("Bold", false, null);//还有这里
}
//主要的是这几句句,剩下的document.execCommand方法的具体用法你搜下好了
</script>
</body>
</html>