龍行天下

            政 博
          隨筆 - 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
          主站蜘蛛池模板: 景德镇市| 苍溪县| 贵德县| 吐鲁番市| 通河县| 从化市| 宜君县| 岳西县| 朔州市| 顺义区| 义乌市| 缙云县| 招远市| 丰城市| 秦皇岛市| 新河县| 景洪市| 汾西县| 外汇| 泰宁县| 山阴县| 郴州市| 大安市| 定结县| 宁明县| 连城县| 巴中市| 兴和县| 赤峰市| 南昌县| 南通市| 涡阳县| 子长县| 塔城市| 鄂托克旗| 漳浦县| 嘉禾县| 孟津县| 弥勒县| 邢台县| 嘉定区|