TinyMCE 7 and elFinder 2.1.65 Integration
    File Structure:
  • assets
  • -- index.php
  • -- builder.php
  • -- config.php
  • -- save_content.php
  • -- update.php
  • -- edit.php
  • -- functions.php
  • -- css
  • ---- style.css
  • -- images
  • -- tinymce
  • -- elFinder

See Home Page in Action

If you only need to add the editor into a project you already have then download this.

In this tutorial I am going to show you how to integrate elFinder for full file management into the TinyMCE editor for seamless operation.
At the end we will be able to upload and manage images and other files using the elFinder interface. And also be able to save our work to a database.
I am assuming that you have already downloaded TinyMCE 7 and elFinder 2.1.65.

• Create a folder and name it assets to house the files and folders.
• Open the assets folder and create a file named builder.php
• Copy/paste the following code into builder.php

This is the correct path to the image folder if TinyMCE and elFinder are in the same folder.

The source files and/or a complete package can be downloaded at the bottom of this tutorial.

In the elFinder folder go to php/connector.minimal.php-dist and rename the file connector.minimal.php

Open the file and look for the following. Change the path and URL to point to the images folder, as I have in the example below.


Let's create a simple MySQL table to store the articles that you create.
On your server go to PhpMyAdmin and create a database.
Then copy/paste the following into the new database.
The AUTO_INCREMENT allows for you to build an unlimited number of articles.
And each article can be edited by going to the edit.php file.


In the assets folder create a new file and name it config.php
Open the file and copy/paste the following.
Change the database credentials to match your database credentials.


In the assets folder create a new file and name it save_content.php.
Open the file and copy/paste the following.


In the assets folder create a new file and name it edit.php
Open the file and copy/paste the following.
This file will let you view, edit, and delete the pages.

In the assets folder create a new file and name it functions.php and copy/paste the following into it.
This is the function that will save the content.


In the assets folder create a new folder and name it css.
Open that css folder and create a new file and name it style.css and copy/paste the following into it.
This is the overall styling.


In the assets folder create a new file and name it index.php
This file will be used to display the articles.


This is the file that is used to preview the articles.
In the assets folder create a new file and name it preview.php
Copy/paste the follow into it.


In the assets folder create a new file and name it menu.php
Copy/paste the following into it.

In the assets/css folder open the file style.css
Copy/paste the following into it.


Download TinyMCE 7 and elFinder 2.1.65. Create a database and add the table and you will have an operational tiny CMS.