怎么实现网页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> 在高德地图上面标点问题 视频地址解析 验证网址的正则怎么写? 客户的变态问题----confirm 默认是取消按钮 JS获取文件夹路径问题 根据输入框的内容,决定按钮是否可用 有谁知道如何禁止别人复制网页上的内容啊? 各位大虾帮帮忙呀!!!请问怎么用脚本弹出确定警告框??? 送分:从文本框和选择框的数值判断结果!! 开启新窗口的题! 关于弹出式提式框 本站中提问时,点上传文件弹出的窗口效果
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>