js Fckeditorのコンテンツ値を取得する


<script type="text/javascript" language="javascript">

    function a()

    {

            //     html

             var checkContent =FCKeditorAPI.GetInstance("FCKeditor1").GetXHTML();

            alert(checkContent);

            //  html   

             var len = FCKeditorAPI.GetInstance("FCKeditor1").GetXHTML().length;

            alert(len);

            //  fck  

            var oEditor = FCKeditorAPI.GetInstance('FCKeditor1');

            //         

            var text = oEditor.EditorDocument.body.innerText;

            alert(text);

            //        

            oEditor.Focus();

 

    }

    </script>