龍行天下

            政 博
          隨筆 - 23, 文章 - 0, 評論 - 12, 引用 - 0
          數據加載中……

          FCKEditor的賦值和取值操作

          1、獲取編輯器中HTML內容

          function getEditorHTMLContents(EditorName)

              
          var oEditor = FCKeditorAPI.GetInstance(EditorName); 
              
          return(oEditor.GetXHTML(true)); 
          }


          2、獲取編輯器中文字內容(在博客發布時獲取無html代碼摘要使用)

          function getEditorTextContents(EditorName)

              
          var oEditor = FCKeditorAPI.GetInstance(EditorName); 
              
          return(oEditor.EditorDocument.body.innerText); 
          }


          3、設置編輯器中內容

          function SetEditorContents(EditorName, ContentStr)

              
          var oEditor = FCKeditorAPI.GetInstance(EditorName) ; 
              oEditor.SetHTML(ContentStr) ; 
          }

          posted on 2008-01-09 12:51 feingto 閱讀(2086) 評論(1)  編輯  收藏 所屬分類: Ajax、JAVASCRIPT

          評論

          # re: FCKEditor的賦值和取值操作   回復  更多評論   

          不錯 收藏
          2008-03-19 16:25 | .kill
          主站蜘蛛池模板: 仁布县| 宜州市| 安徽省| 明光市| 滁州市| 新泰市| 崇信县| 霸州市| 卓资县| 大连市| 和平区| 木里| 天峻县| 股票| 石泉县| 汉源县| 江门市| 通化县| 班玛县| 台前县| 阜宁县| 泸水县| 宣恩县| 耿马| 黄山市| 安龙县| 马鞍山市| 道孚县| 新河县| 安庆市| 从化市| 壶关县| 鹿邑县| 德阳市| 鄂尔多斯市| 喜德县| 名山县| 湘乡市| 改则县| 麻栗坡县| 金塔县|