2009,February

2009.2

10

如何获取FCKEditor的值

作者: admin | 类别: 技术文档| 查看: 2656

常规的用法:
在页面插入
<script type="text/javascript" src="/editor/fck_editor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor('Content', 730, 450) ;
oFCKeditor.BasePath = "/editor/fck_editor/";
oFCKeditor.ReplaceTextarea();
}

function getFckeditorText(editor_name)
{
var oEditor = FCKeditorAPI.GetInstance(editor_name) ;
returnValue = oEditor.GetXHTML(true);

return returnValue;
}
function checkData(sTargetName) {
document.getElementById(sTargetName).value = getFckeditorText(sTargetName);
//加入其它判断检测输入。
r...

2009.2

10

教学设计

作者: admin | 类别: 资料收集| 查看: 957

教学模式与策略:
《使用主题美化网页》这节课为新授课,教学内容中学生需要掌握的操作部分较多,而且各个环节间相互联系紧密,针对这一特点我采用探究式教学方式,使用情趣导入、任务驱动、讲练结合、创造情境进行探究等教学手段。
 

评论: 0 标签:
2009.2

9

FCKeditor编辑器的API使用

作者: admin | 类别: 技术文档| 查看: 1295

利用Javascript取和设FCKeditor值也是非常容易的,如下:

// 获取编辑器中HTML内容
function getEditorHTMLContents(EditorName) {
    var oEditor = FCKeditorAPI.GetInstance(EditorName);
    return(oEditor.GetXHTML(true));
}

// 获取编辑器中文字内容
function getEditorTextContents(EditorName) {
    var oEditor = FCKeditorAPI.GetInstance(EditorName);
    return(oEditor.EditorDocument.body.innerText);
}

// 设置编辑器中内容
function SetEditorContents(EditorName, ContentStr) {
    var oEditor = FCKeditorAPI.GetInstance(EditorName) ;
    oEditor.SetHTML(ContentStr) ;
}

FCKeditorAPI是FCKedi...

评论: 0 标签: FCKeditor API Javascript AJAX
共3条页数: 1/1每页8条1