+ <div class="description">\r
+ <p>\r
+ This sample shows how to add event handlers to CKEditor with PHP.\r
+ </p>\r
+ <p>\r
+ A snippet of the configuration code can be seen below; check the source code of this page for\r
+ the full definition:\r
+ </p>\r
+ <pre class="samples"><?php\r
+// Include the CKEditor class.\r
+include("ckeditor/ckeditor.php");\r
+\r
+// Create a class instance.\r
+$CKEditor = new CKEditor();\r
+\r
+// Path to the CKEditor directory.\r
+$CKEditor->basePath = '/ckeditor/';\r
+\r
+// The initial value to be displayed in the editor.\r
+$initialValue = 'This is some sample text.';\r
+\r
+// Add event handler, <em>instanceReady</em> is fired when editor is loaded.\r
+$CKEditor-><strong>addEventHandler</strong>('instanceReady', 'function (evt) {\r
+ alert("Loaded editor: " + evt.editor.name);\r
+}');\r
+\r
+// Create an editor instance.\r
+$CKEditor->editor("editor1", $initialValue);\r
+</pre>\r
+ </div>\r