龍行天下

            政 博
          隨筆 - 23, 文章 - 0, 評論 - 12, 引用 - 0

          導航

          <2008年1月>
          303112345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          常用鏈接

          留言簿

          隨筆分類

          隨筆檔案

          文章分類

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          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 閱讀(2092) 評論(1)  編輯  收藏 所屬分類: Ajax、JAVASCRIPT

          評論

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

          不錯 收藏
          2008-03-19 16:25 | .kill
          主站蜘蛛池模板: 同仁县| 尼玛县| 合肥市| 高碑店市| 永吉县| 宿迁市| 赤壁市| 双城市| 保山市| 河西区| 衡阳市| 安岳县| 阿巴嘎旗| 平湖市| 会理县| 株洲市| 天等县| 大渡口区| 西乡县| 团风县| 广丰县| 绍兴市| 孙吴县| 湖州市| 临夏市| 涪陵区| 上虞市| 子洲县| 金寨县| 兴安盟| 西峡县| 斗六市| 蒙城县| 南溪县| 肃北| 鄂托克旗| 湖州市| 荥阳市| 清镇市| 凌云县| 普宁市|