zoukankan      html  css  js  c++  java
  • js如何获得FCKeditor控件的值

    利用Javascript取和设FCKeditor值也是非常容易的,如下:

    // 获取编辑器中HTML内容
    function getEditorHTMLContents(EditorName) {
    var oEditor = FCKeditorAPI.GetInstance(EditorName);
    return(oEditor.GetXHTML(true));
    }

    // 获取编辑器中文字内容
    function getEditorTextContents(EditorName) {
    var oEditor = FCKeditorAPI.GetInstance(EditorName);
    return(oEditor.EditorDocument.body.innerText);
    }

    // 设置编辑器中内容
    function SetEditorContents(EditorName, ContentStr) {
    var oEditor = FCKeditorAPI.GetInstance(EditorName) ;
    oEditor.SetHTML(ContentStr) ;
    }
  • 相关阅读:
    Python基础Day2
    HDU
    HDU
    BZOJ
    Gym
    UVA
    UVA
    UVA
    UVA
    BZOJ
  • 原文地址:https://www.cnblogs.com/aaa6818162/p/2124056.html
Copyright © 2011-2022 走看看