龍行天下

            政 博
          隨筆 - 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
          主站蜘蛛池模板: 昔阳县| 台北市| 蒙自县| 阿图什市| 许昌市| 宣武区| 衡东县| 乌苏市| 安溪县| 同心县| 通化市| 林州市| 咸阳市| 福泉市| 驻马店市| 沂南县| 南昌县| 隆尧县| 乌鲁木齐县| 保靖县| 永康市| 盐池县| 余干县| 基隆市| 天门市| 汽车| 邹平县| 微博| 余干县| 绵竹市| 建昌县| 灌阳县| 东乌| 平乡县| 兰溪市| 上犹县| 泉州市| 广元市| 台江县| 城口县| 崇阳县|