ดูการเปลี่ยนแปลง ของ ckeditor ในแต่ละเวอร์ชั่น
วิธีใช้งาน CKEditor เวอร์ชั่น 4.4.1 ร่วมกับ jQuery
ดาวน์โหลดได้ที่
ตัวอย่างโค้ด และการใช้งาน
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <head> <meta http-equiv= "Content-Type" content= "text/html; charset=utf-8" /> <title> </title> </head> <body> <div style= "margin:auto;width:75%;" > <form id= "form1" name= "form1" method= "post" action= "" > <textarea name= "message" id= "message" cols= "45" rows= "5" ></textarea> </form> <br /> </div> <script src= "//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" ></script> <script src= "ckeditor/ckeditor.js" ></script> <script src= "ckeditor/adapters/jquery.js" ></script> <script type= "text/javascript" > $( function (){ $( "#message" ).ckeditor(); // บรรทัดล่างที่ comment ไว้ลบออกได้ // var editor = $("#message").ckeditor().editor; // $(".emoticon").click(function(){ // var imgIns=$(this).attr("src"); // var imgHTML="<img src="+imgIns+" />"; // editor.insertHtml(imgHTML); // }); }); </script> </body> </html> |