X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_samples%2Fphp%2Fadvanced.php;fp=_samples%2Fphp%2Fadvanced.php;h=0000000000000000000000000000000000000000;hb=4625dba05116026713fee9008dd93306be0d1553;hp=a27dd4f1d5df2d467ba12c5383a43eb519d7f51c;hpb=3fe9cac293e090ea459a3ee10d78cbe9e1dd0e03;p=ckeditor.git diff --git a/_samples/php/advanced.php b/_samples/php/advanced.php deleted file mode 100644 index a27dd4f..0000000 --- a/_samples/php/advanced.php +++ /dev/null @@ -1,120 +0,0 @@ - - - - - Setting Configuration Options — CKEditor Sample - - - - -

- CKEditor Sample — Setting Configuration Options -

-

- This sample shows how to insert a CKEditor instance with custom configuration options. -

-

- To set configuration options, use the config property. To set the attributes of a <textarea> element (which is displayed instead of CKEditor in unsupported browsers), use the textareaAttributes property. -

-
-<?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/';
-
-// Set global configuration (used by every instance of CKEditor).
-$CKEditor->config['width'] = 600;
-
-// Change default textarea attributes.
-$CKEditor->textareaAttributes = array("cols" => 80, "rows" => 10);
-
-// The initial value to be displayed in the editor.
-$initialValue = 'This is some sample text.';
-
-// Create the first instance.
-$CKEditor->editor("textarea_id", $initialValue);
-?>
-

- Note that textarea_id in the code above is the name attribute of - the <textarea> element to be created. -

- - -
- -
-
- -returnOutput = true; - -// Path to the CKEditor directory, ideally use an absolute path instead of a relative dir. -// $CKEditor->basePath = '/ckeditor/' -// If not set, CKEditor will try to detect the correct path. -$CKEditor->basePath = '../../'; - -// Set global configuration (will be used by all instances of CKEditor). -$CKEditor->config['width'] = 600; - -// Change default textarea attributes. -$CKEditor->textareaAttributes = array("cols" => 80, "rows" => 10); - -// The initial value to be displayed in the editor. -$initialValue = '

This is some sample text. You are using CKEditor.

'; - -// Create the first instance. -$code = $CKEditor->editor("editor1", $initialValue); - -echo $code; -?> -
- -editor("editor2", $initialValue, $config); -?> -

- -

-
- - -