douxi3233 2014-04-11 18:28
浏览 25
已采纳

Ckeditor没有为我工作?

I want use ckeditor 4.3.4 to codeigniter 2.1.4 i tried to start testing it in jsbin, it did not work.what do i do?

How can you use ckeditor 4.3.4 in codeigniter 2.1.4? How can install ckeditor basic?

DEMO: http://jsbin.com/lacekiyu/1/edit

Code:

<html>
    <head>
<script src="www.ckeditor.com/apps/ckeditor/4.3.4/ckeditor.js"></script>
            <script>
                CKEDITOR.replace( 'editor1' );
            </script>
    </head>
    <body>
        <form>
            <textarea name="editor1" id="editor1" rows="10" cols="80">
                This is my textarea to be replaced with CKEditor.
            </textarea>
        </form>
    </body>
</html>
  • 写回答

2条回答 默认 最新

  • doubeiji2602 2014-04-11 18:33
    关注

    1). Change your ckeditor js link to correct url: http://ckeditor.com/apps/ckeditor/4.3.4/ckeditor.js. 2). Add body onload event, and it will work.

    <html>
      <head>
      <script src="http://ckeditor.com/apps/ckeditor/4.3.4/ckeditor.js"></script>
      <script>
        function init() {  
          CKEDITOR.replace( 'editor1' );
        }
      </script>
      </head>
      <body onload="init()">
        <form>
          <textarea name="editor1" id="editor1" rows="10" cols="80">
            This is my textarea to be replaced with CKEditor.
          </textarea>
        </form>
      </body>
    </html>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?