X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_samples%2Fphp%2Freplaceall.php;h=4415fbdc1be6fe6b1cebb7ee877408a6ca7e254d;hp=38efc806ccffd41736903e1c8e9e97f00cd438f4;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hpb=9afde8772159bd3436f1f5b7862960307710ae5a diff --git a/_samples/php/replaceall.php b/_samples/php/replaceall.php index 38efc80..4415fbd 100644 --- a/_samples/php/replaceall.php +++ b/_samples/php/replaceall.php @@ -1,19 +1,43 @@ - Sample - CKEditor + Replace All Textarea Elements — CKEditor Sample -

- CKEditor Sample +

+ CKEditor Sample — Replace All Textarea Elements Using PHP Code

- +
+

+ This sample shows how to replace all <textarea> elements + with CKEditor by using PHP code. +

+

+ To replace all <textarea> elements, place the following call at any point + after the last <textarea> element: +

+
+<?php
+// Include the CKEditor class.
+include("ckeditor/ckeditor.php");
+
+// Create a class instance.
+$CKEditor = new CKEditor();
+
+// Path to the CKEditor directory.
+$CKEditor->basePath = '/ckeditor/';
+
+// Replace all textarea elements with CKEditor.
+$CKEditor->replaceAll();
+?>
+
+
- -
- Output -
-

-
- -

-

-
- -

-

- -

-
-
+
+

+ + +

+

+ + +

+

+ +

+
basePath = '/ckeditor/' // If not set, CKEditor will try to detect the correct path. $CKEditor->basePath = '../../'; - // Replace all textareas with CKEditor. + // Replace all textarea elements with CKEditor. $CKEditor->replaceAll(); ?>