Mapping: http://huypv/ - /srv/www/huypv
Download from http://ckeditor.com/
Extract
+ ckeditor/
Create
+ editor.html
+ sever.php
+ browse.php
Key to code (JS - onclick): window.opener.CKEDITOR.tools.callFunction(getParamFromUrl('CKEditorFuncNum'), choosedFileUrl); window.close();
+ upload.php
Key to code (PHP - end script): window.parent.CKEDITOR.tools.callFunction($_GET['CKEditorFuncNum'], $uploadedFileUrl, $errorMessageWillBeAlerted);
- edit ckeditor/config.js
config.filebrowserImageBrowseUrl = '/browse.php';
config.filebrowserImageUploadUrl = '/upload.php';
config.entities_latin = false;
Test submit: http://huypv/editor.html [POST] http://huypv/server.php
Test upload image: Click image button on toolbar.