리빌더 부분 추가
This commit is contained in:
18
plugin/editor/rb.editor/php/rb.fonts.php
Normal file
18
plugin/editor/rb.editor/php/rb.fonts.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
$g5_editor = isset( $_GET['editor']) ? $_GET['editor'] : 'rb.editor';
|
||||
$editor_url = G5_PATH.'/plugin/editor/'.$g5_editor;
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
// 대상 폴더 (fonts 경로)
|
||||
$folderPath = $editor_url.'/fonts';
|
||||
|
||||
if (is_dir($folderPath)) {
|
||||
$folders = array_filter(scandir($folderPath), function($item) use ($folderPath) {
|
||||
return $item !== '.' && $item !== '..' && is_dir($folderPath . DIRECTORY_SEPARATOR . $item);
|
||||
});
|
||||
echo json_encode(["folders" => array_values($folders)]);
|
||||
} else {
|
||||
echo json_encode(["error" => "폰트없음"]);
|
||||
}
|
||||
Reference in New Issue
Block a user