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