Allowed file types for the Image browser are: jpg, jpeg, gif, png
Allowed file types for the File browser for this demo are: txt, doc, docx, xls, xlsx, ppt, pptx, zip, rar, jpg, jpeg, gif, png
<?php
require_once '../lib/Kendo/Autoload.php';
?>
<div class="box wide">
<p>Allowed file types for the Image browser are: jpg, jpeg, gif, png</p>
<p>Allowed file types for the File browser for this demo are: txt, doc, docx, xls, xlsx, ppt, pptx, zip, rar, jpg, jpeg, gif, png</p>
</div>
<?php
$editor = new \Kendo\UI\Editor('editor');
$editor->addTool(
"insertImage", "insertFile"
);
// configure image browser
$imageBrowser = new \Kendo\UI\EditorImageBrowser();
$imageBrowser_transport = new \Kendo\UI\EditorImageBrowserTransport();
$imageBrowser_transport->thumbnailUrl('../lib/ImageBrowser.php?action=thumbnail');
$imageBrowser_transport->uploadUrl('../lib/ImageBrowser.php?action=upload');
$imageBrowser_transport->imageUrl('../lib/ImageBrowser.php?action=image&path={0}');
$imageBrowser_transport->read('../lib/ImageBrowser.php?action=read');
$imageBrowser_destroy = new \Kendo\UI\EditorImageBrowserTransportDestroy();
$imageBrowser_destroy
->url('../lib/ImageBrowser.php?action=destroy')
->type('POST');
$imageBrowser_transport->destroy($imageBrowser_destroy);
$imageBrowser_create = new \Kendo\UI\EditorImageBrowserTransportCreate();
$imageBrowser_create
->url('../lib/ImageBrowser.php?action=create')
->type('POST');
$imageBrowser_transport->create($imageBrowser_create);
$imageBrowser->transport($imageBrowser_transport);
$editor->imageBrowser($imageBrowser);
// configure file browser
$fileBrowser = new \Kendo\UI\EditorFileBrowser();
$fileBrowser_transport = new \Kendo\UI\EditorFileBrowserTransport();
$fileBrowser_transport->uploadUrl('../lib/FileBrowser.php?action=upload');
$fileBrowser_transport->fileUrl('../lib/FileBrowser.php?action=file&path={0}');
$fileBrowser_transport->read('../lib/FileBrowser.php?action=read');
$fileBrowser_destroy = new \Kendo\UI\EditorFileBrowserTransportDestroy();
$fileBrowser_destroy
->url('../lib/FileBrowser.php?action=destroy')
->type('POST');
$fileBrowser_transport->destroy($fileBrowser_destroy);
$fileBrowser_create = new \Kendo\UI\EditorFileBrowserTransportCreate();
$fileBrowser_create
->url('../lib/FileBrowser.php?action=create')
->type('POST');
$fileBrowser_transport->create($fileBrowser_create);
$fileBrowser->transport($fileBrowser_transport);
$editor->fileBrowser($fileBrowser);
// add content
$editor
->attr('style', 'height:440px')
->startContent();
?>
<p><img src="../content/web/editor/kendo-ui-web.png" alt="Editor for PHP logo" style="display:block;margin-left:auto;margin-right:auto;" /></p>
<p>
Kendo UI Editor allows your users to edit HTML in a familiar, user-friendly way.<br />
In this version, the Editor provides the core HTML editing engine, which includes basic text formatting, hyperlinks, lists,
and image handling. The widget <strong>outputs identical HTML</strong> across all major browsers, follows
accessibility standards and provides API for content manipulation.
</p>
<p>Features include:</p>
<ul>
<li>Text formatting & alignment</li>
<li>Bulleted and numbered lists</li>
<li>Hyperlink and image dialogs</li>
<li>Cross-browser support</li>
<li>Identical HTML output across browsers</li>
<li>Gracefully degrades to a <code>textarea</code> when JavaScript is turned off</li>
</ul>
<p>
Read <a href="http://docs.telerik.com/kendo-ui">more details</a> or send us your
<a href="http://www.telerik.com/forums">feedback</a>!
</p>
<?php
$editor->endContent();
echo $editor->render();
?>