web编辑器基础模型
var editor;
editor = document.getElementById("ftest").contentWindow;
alert(editor.document.body.innerHTML);
//只需键入以下设定,iframe立刻变成编辑器。
editor.document.designMode = 'On';
editor.document.contentEditable = true;
//但是IE与FireFox有点不同,为了兼容FireFox,所以必须创建一个新的document。
editor.document.open();
editor.document.writeln('');
editor.document.close();
//字体特效 - 加粗方法一
//字体特效 - 加粗方法二
function addBold()
{
alert("asd");
}