---
title: Filebrowser in Joomla
description: Integrate Jodit file browser into Joomla CMS.
keywords: joomla filebrowser, jodit joomla, file browser
---

# Integrate filebrowser in Joomla CMS

The text editor can be easily integrated with Joomla. For this purpose there is a special plug-in, but sometimes you just need to embed the editor in your site and use filebrowser.
You can use Jodit [official php connector](https://github.com/xdan/jodit-connectors)
Install this connector

```shell
composer create-project --no-dev jodit/connector
```

Change file in `connector` folder `config.php` with the following code:

```php
return [
    'sources' => [
        'default' => [
            'root' => JPATH_BASE.'/images/',
            'baseurl' => '/images/',
            'extensions' => ['jpg', 'png', 'gif', 'jpeg'],
        ]
    ]
];
```

And change `Application.php`

```php
define('_JEXEC', 1);
define('JPATH_BASE', realpath(realpath(__DIR__).'/../../../../../')); // replace to valid path
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';

$app = JFactory::getApplication('site');

class JoditRestApplication extends \jodit\JoditApplication {
    function checkPermissions() {
        $user = JFactory::getUser();
        if (!$user->id) {
            trigger_error('You are not authorized!', E_USER_WARNING);
        }
    }
}
```

After that you can use this connector in Jodit

```javascript
Jodit.make('#editor', {
	uploader: {
		url: '/somefolder/connector/index.php?action=upload'
	},
	filebrowser: {
		ajax: {
			url: '/somefolder/connector/index.php'
		}
	}
});
```

That is all. This code protect your site from unauthorized uploding files.
