X-Git-Url: https://scm.cri.ensmp.fr/git/ckeditor.git/blobdiff_plain/256592bf803e851aa7fc953e08a6e9e58d970f8c..871bad8291b6dbc29d489d95d185458caab25158:/skins/ckeditor/_samples/php/replace.php diff --git a/skins/ckeditor/_samples/php/replace.php b/skins/ckeditor/_samples/php/replace.php new file mode 100644 index 0000000..d22dcb7 --- /dev/null +++ b/skins/ckeditor/_samples/php/replace.php @@ -0,0 +1,87 @@ + + + +
+
+ This sample shows how to replace a selected <textarea> element
+ with a CKEditor instance by using PHP code.
+
+ To replace a <textarea> element, place the following call at any point
+ after the <textarea> element:
+
+<?php
+// Include the CKEditor class.
+include_once "ckeditor/ckeditor.php";
+
+// Create a class instance.
+$CKEditor = new CKEditor();
+
+// Path to the CKEditor directory.
+$CKEditor->basePath = '/ckeditor/';
+
+// Replace a textarea element with an id (or name) of "textarea_id".
+$CKEditor->replace("textarea_id");
+?>
+
+ Note that textarea_id in the code above is the id attribute of
+ the <textarea> element to be replaced.
+