board_form.php 에서 상단 내용 하단 내용 에디터 문제..
본문
저는 상단부분에 <div>태그 하나만 넣고 싶은데
자동으로 닫는태그가 생성되더라구요 ㅠㅠ
<div></div>
이렇게요 ㅠㅠ
<?php echo editor_html("bo_content_head", get_text(html_purifier($board['bo_content_head']), 0)); ?>
예전에 이 부분 수정하면 되던데 이제는 그렇게 수정해도 안되요 ㅠㅠ
해결 방법이 있을까요?
답변 2
단순히 div만 넣는거면 에디터 없애고 이렇게 하셔도 될 듯.
<textarea id="bo_content_head" name="bo_content_head" rows="5"><?php echo $board['bo_content_head']; ?></textarea>
앞뒤 <div></div> 없애는 코드입니다.
$editor = editor_html("bo_content_head", get_text(html_purifier($board['bo_content_head']), 0));
$editor = preg_replace('/^<div>([\d\D]*?)<\/div>$/', '$1', $editor);
echo $editor;
답변을 작성하시기 전에 로그인 해주세요.