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