cheditor_test.php 581 B

123456789101112131415161718192021222324252627
  1. <?php
  2. include_once( 'ckeditor/ckeditor.php' ) ;
  3. ?>
  4. <html>
  5. <head>
  6. </head>
  7. <body>
  8. <?php
  9. $CKEditor = new CKEditor();
  10. $config = array();
  11. $config['toolbar'] = array(
  12. array( 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike' ),
  13. array( 'Image', 'Link', 'Unlink', 'Anchor' )
  14. );
  15. /*
  16. $events['instanceReady'] = 'function (ev) {
  17. alert("Loaded: " + ev.editor.name);
  18. }';
  19. */
  20. $events=array();
  21. $id="id_text";
  22. $CKEditor->textareaAttributes = array( "rows" => 8, "cols" => 30 , "id"=>"id_text");
  23. $CKEditor->editor("field1", "<p>Initial value.</p>", $config, $events);
  24. ?>
  25. </body>
  26. </html>