From f3ce03a71d3dd1c7dcbe474197fb1588949735db Mon Sep 17 00:00:00 2001 From: lsces Date: Sun, 10 Jun 2012 19:03:48 +0100 Subject: Update to CKEditor version 3.6.3 --- _samples/php/replace.php | 150 +++++++++++++++++++++++++++-------------------- 1 file changed, 87 insertions(+), 63 deletions(-) (limited to '_samples/php/replace.php') diff --git a/_samples/php/replace.php b/_samples/php/replace.php index 216f903..36f877b 100644 --- a/_samples/php/replace.php +++ b/_samples/php/replace.php @@ -1,63 +1,87 @@ - - - - - Sample - CKEditor - - - - -

- CKEditor Sample -

- -
- -
- -
- Output -
-

-
- -

-

- -

-
-
- - basePath = '/ckeditor/' - // If not set, CKEditor will try to detect the correct path. - $CKEditor->basePath = '../../'; - // Replace textarea with id (or name) "editor1". - $CKEditor->replace("editor1"); - ?> - - + + + + + Replace Selected Textarea Elements — CKEditor Sample + + + + +

+ CKEditor Sample — Replace Selected Textarea Elements Using PHP Code +

+
+

+ 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. +

+
+ +
+ +
+
+

+ + +

+

+ +

+
+ + basePath = '/ckeditor/' + // If not set, CKEditor will try to detect the correct path. + $CKEditor->basePath = '../../'; + // Replace a textarea element with an id (or name) of "editor1". + $CKEditor->replace("editor1"); + ?> + + -- cgit v1.3