濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > FCKeditorAPI 手冊(cè) js操作獲取等

FCKeditorAPI 手冊(cè) js操作獲取等

熱門(mén)標(biāo)簽:靈聲智能電話機(jī)器人招聘 智能電銷(xiāo)機(jī)器人真的好嗎 長(zhǎng)春銷(xiāo)售外呼系統(tǒng)業(yè)務(wù) 長(zhǎng)春防封卡電銷(xiāo)卡套餐 興化400電話辦理多少錢(qián) 天津電銷(xiāo)卡外呼系統(tǒng)線路 企業(yè)電話機(jī)器人辦理 株洲外呼營(yíng)銷(xiāo)系統(tǒng)有哪些 四平電話機(jī)器人哪家好
復(fù)制代碼 代碼如下:

function abc()
{
var checkContent =FCKeditorAPI.GetInstance("editor");//獲取實(shí)例
alert(checkContent.GetXHTML());//獲取當(dāng)前內(nèi)容
var newelement = document.createElement("a");
newelement.href="#";
newelement.innerHTML="df";
checkContent.InsertElement(newelement);//前部添加元素(無(wú)返回值)
var a=checkContent.InsertElementAndGetIt(newelement);//前部添加元素(返回元素)
checkContent.InsertHtml("")//添加html
checkContent.SetHTML("",true);//設(shè)置內(nèi)容,后為bool,是否所見(jiàn)即所得

}
function aaa()
{
var checkContent =FCKeditorAPI.GetInstance("editor");//獲取實(shí)例
checkContent.SwitchEditMode();//轉(zhuǎn)變編輯模式
checkContent.UpdateLinkedField();//更新關(guān)聯(lián)文件
}
function FCKeditor_OnComplete( checkContent )//當(dāng)加載完
{
alert( checkContent.Name ) ;
}

//設(shè)置fckeditor為只讀
function FCKeditor_OnComplete(editorInstance)
{
editorInstance.EditorDocument.body.disabled = true;
editorInstance.EditorWindow.parent.document.getElementById ('xExpanded').style.display = 'none';
editorInstance.EditorWindow.parent.document.getElementById('xCollapsed').style.display = 'none';
editorInstance.EditorWindow.blur();
}

//向編輯器插入指定代碼
function insertHTMLToEditor(codeStr){
var oEditor = FCKeditorAPI.GetInstance("content");
if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG){
oEditor.InsertHtml(codeStr);
}else{
return false;
}
}
//統(tǒng)計(jì)編輯器中內(nèi)容的字?jǐn)?shù)
function getLength(){
var oEditor = FCKeditorAPI.GetInstance("content");
var oDOM = oEditor.EditorDocument;
var iLength ;
if(document.all){
iLength = oDOM.body.innerText.length;
}else{
var r = oDOM.createRange();
r.selectNodeContents(oDOM.body);
iLength = r.toString().length;
}
alert(iLength);
}
//執(zhí)行指定動(dòng)作
function ExecuteCommand(commandName){
var oEditor = FCKeditorAPI.GetInstance("content") ;
oEditor.Commands.GetCommand(commandName).Execute() ;
}
//設(shè)置編輯器中內(nèi)容
function SetContents(codeStr){
var oEditor = FCKeditorAPI.GetInstance("content") ;
oEditor.SetHTML(codeStr) ;
}

//使用FCKEditor時(shí)使用js在光標(biāo)處添加任意字符串
function InsertHTML(e,inStr)//e:FCKEditor的ID,inStr:要插入的信息
{
var oEditor = FCKeditorAPI.GetInstance(e) ;
if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG )
{
oEditor.InsertHtml( inStr ) ;
}
else
alert("You must be on WYSIWYG mode!" ) ;
}

function ExecuteCommand( commandName,e )
{
var oEditor = FCKeditorAPI.GetInstance(e) ;
oEditor.Commands.GetCommand(commandName ).Execute() ;
}
您可能感興趣的文章:
  • JS操作Fckeditor的一些常用方法(獲取、插入等)
  • CKEditor無(wú)法驗(yàn)證的解決方案(js驗(yàn)證+jQuery Validate驗(yàn)證)
  • javascript獲取ckeditor編輯器的值(實(shí)現(xiàn)代碼)
  • fckeditor常用Js,獲取fckeditor內(nèi)容,統(tǒng)計(jì)fckeditor字?jǐn)?shù),向fckeditor寫(xiě)入指定代碼
  • javascript fckeditor編輯器取值與賦值實(shí)現(xiàn)代碼
  • FCKEditor常用Js代碼,獲取FCK內(nèi)容,統(tǒng)計(jì)FCK字?jǐn)?shù),向FCK寫(xiě)入指定代碼
  • FCKeditor提供了一個(gè)完整的JavaScript API
  • JavaScript 使用Ckeditor+Ckfinder文件上傳案例詳解

標(biāo)簽:巴彥淖爾 運(yùn)城 石嘴山 貴港 黑龍江 新疆 漯河 青海

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《FCKeditorAPI 手冊(cè) js操作獲取等》,本文關(guān)鍵詞  FCKeditorAPI,手冊(cè),操作,獲取,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《FCKeditorAPI 手冊(cè) js操作獲取等》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于FCKeditorAPI 手冊(cè) js操作獲取等的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    汉川市| 东兰县| 潜山县| 巩义市| 澄江县| 余干县| 桑日县| 南开区| 汪清县| 荥阳市| 乌什县| 沾化县| 娄烦县| 平安县| 上杭县| 木兰县| 和龙市| 乌兰浩特市| 衡水市| 九龙坡区| 凤冈县| 沁源县| 孟村| 缙云县| 高要市| 金乡县| 康保县| 金沙县| 九江市| 安陆市| 玉山县| 晋城| 周至县| 肇东市| 格尔木市| 雷波县| 冕宁县| 嘉祥县| 古田县| 法库县| 诏安县|