javascript fckeditor編輯器取值與賦值實(shí)現(xiàn)代碼
更新時(shí)間:2010年05月26日 20:39:47 作者:
這篇文章對于使用fckeditor編輯器的朋友是個(gè)不錯(cuò)應(yīng)用,主要介紹的是js對fckeditor的取值與賦值操作,fckeditor是個(gè)不錯(cuò)的比較方便的擴(kuò)展功能的編輯器。
獲取編輯器中HTML內(nèi)容
function getEditorHTMLContents(EditorName)
{
var oEditor = FCKeditorAPI.GetInstance(EditorName);
return(oEditor.GetXHTML(true));
}
獲取編輯器中文字內(nèi)容
function getEditorTextContents(EditorName)
{
var oEditor = FCKeditorAPI.GetInstance(EditorName);
return(oEditor.EditorDocument.body.innerText);
}
設(shè)置編輯器中內(nèi)容
function SetEditorContents(EditorName, ContentStr)
{
var oEditor = FCKeditorAPI.GetInstance(EditorName) ;
oEditor.SetHTML(ContentStr) ;
}
FCKeditor 插件開發(fā)
復(fù)制代碼 代碼如下:
function getEditorHTMLContents(EditorName)
{
var oEditor = FCKeditorAPI.GetInstance(EditorName);
return(oEditor.GetXHTML(true));
}
獲取編輯器中文字內(nèi)容
復(fù)制代碼 代碼如下:
function getEditorTextContents(EditorName)
{
var oEditor = FCKeditorAPI.GetInstance(EditorName);
return(oEditor.EditorDocument.body.innerText);
}
設(shè)置編輯器中內(nèi)容
復(fù)制代碼 代碼如下:
function SetEditorContents(EditorName, ContentStr)
{
var oEditor = FCKeditorAPI.GetInstance(EditorName) ;
oEditor.SetHTML(ContentStr) ;
}
FCKeditor 插件開發(fā)
您可能感興趣的文章:
- JS操作Fckeditor的一些常用方法(獲取、插入等)
- CKEditor無法驗(yàn)證的解決方案(js驗(yàn)證+jQuery Validate驗(yàn)證)
- javascript獲取ckeditor編輯器的值(實(shí)現(xiàn)代碼)
- FCKeditorAPI 手冊 js操作獲取等
- fckeditor常用Js,獲取fckeditor內(nèi)容,統(tǒng)計(jì)fckeditor字?jǐn)?shù),向fckeditor寫入指定代碼
- FCKEditor常用Js代碼,獲取FCK內(nèi)容,統(tǒng)計(jì)FCK字?jǐn)?shù),向FCK寫入指定代碼
- FCKeditor提供了一個(gè)完整的JavaScript API
- JavaScript 使用Ckeditor+Ckfinder文件上傳案例詳解
相關(guān)文章
autogrow 讓FCKeditor高度隨內(nèi)容增加的插件
讓FCKeditor高度隨內(nèi)容增加的插件,這個(gè)插件在默認(rèn)情況下可能運(yùn)行不正常,必須做一點(diǎn)修改才可以。2011-02-02javascript fckeditor編輯器取值與賦值實(shí)現(xiàn)代碼
這篇文章對于使用fckeditor編輯器的朋友是個(gè)不錯(cuò)應(yīng)用,主要介紹的是js對fckeditor的取值與賦值操作,fckeditor是個(gè)不錯(cuò)的比較方便的擴(kuò)展功能的編輯器。2010-05-05FCK編輯器(FCKEditor)添加新按鈕和功能的修改方法
最近項(xiàng)目需要對已有的FCKeditor添加新的功能,以前的做法只是在外殼處再次封裝,這次無法滿足需求只能進(jìn)行內(nèi)部修改了。2010-11-11ajax php實(shí)現(xiàn)給fckeditor文本編輯器增加圖片刪除功能
工作需要需要fck編輯器的服務(wù)器瀏覽加個(gè)圖片刪除的功能,我們利用ajax php實(shí)現(xiàn)的有需要的朋友可以參考下2012-12-12asp.net CKEditor和CKFinder的應(yīng)用
CKEditor和CKFinder在ASP.NET中的應(yīng)用,需要的朋友可以參考下。2010-01-01整合ckeditor+ckfinder,解決上傳文件路徑問題
現(xiàn)在fckeditor已經(jīng)改名為ckeditor,上傳控件也分離為ckfinder,按照說明文檔的默認(rèn)配置會(huì)出現(xiàn)上傳路徑不正確的情況,因?yàn)槲覀兊木W(wǎng)站可以通過定義默認(rèn)網(wǎng)站、虛擬目錄、以及放在網(wǎng)站的子目錄下進(jìn)行訪問2011-11-11編輯器中designMode和contentEditable的屬性的介紹
先解釋一下在線編輯器的原理:首先需要IE5.0以上版本的支持.因?yàn)镮E5.0以上版本有一個(gè)編輯狀態(tài),designMode是document的屬性,意思是設(shè)置或獲取表明文檔是否可被編輯的值,默認(rèn)值為off或Inherit2008-11-11