diff --git a/lib/common.lib.php b/lib/common.lib.php index be5cb2a69..5704abb15 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1720,4 +1720,34 @@ function delete_cache_latest($bo_table) unlink($filename); } } + +// 에디터 이미지 얻기 +function get_editor_image($contents) +{ + // $contents 중 img 태그 추출 + $pattern = "/]*src=[\'\"]?([^>\'\"]+".str_replace(".", "\.", $_SERVER['HTTP_HOST'])."[^>\'\"]+)[\'\"]?[^>]*>/"; + preg_match_all($pattern, $contents, $matchs); + + return $matchs; +} + +// 에디터 썸네일 삭제 +function delete_editor_thumbnail($contents) +{ + // $contents 중 img 태그 추출 + $matchs = get_editor_image($contents); + + for($i=0; $i \ No newline at end of file