mirror of
https://github.com/Codiad/Codiad.git
synced 2026-03-23 17:36:51 +01:00
Add FileExtensionTextMode plugin
a plugin to customize the join of file extension and the text mode. also add an API to the editor for this.
This commit is contained in:
19
components/fileExtTextMode/getFileExtTextModes.php
Normal file
19
components/fileExtTextMode/getFileExtTextModes.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
require_once '../../common.php';
|
||||
require_once 'defaultValues.php';
|
||||
|
||||
Common::checkSession();
|
||||
|
||||
$ext = false;
|
||||
//ignore warnings
|
||||
$ext = @Common::getJSON('fileExtensions.php');
|
||||
|
||||
if(!is_array($ext)){
|
||||
//default extensions
|
||||
$ext = $defaultExtensions;
|
||||
}
|
||||
|
||||
echo json_encode(array('status' => 'success', 'msg' => 'Extensions send', 'extensions' => $ext));
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user