글쓰기 기본내용에 표를 삽입하고싶어서 원래 textarea였던걸 dhtml editor를 쓰도록 코드수정을 했습니다.
그런데 표를 다 입력한 후에 확인버튼을 누르면 textarea였을때 입력했던 내용으로 초기화 됩니다...

>>확인누른 후

코드는 bbs/board_form.php 파일에서
Copy
<th scope="row"><label for="bo_insert_content">글쓰기 기본 내용</label></th>
<td>
<textarea id="bo_insert_content" name="bo_insert_content" rows="5"><?php echo $board['bo_insert_content'] ?></textarea>
</td>
이 부분을
Copy
<th scope="row"><label for="bo_insert_content">글쓰기 기본 내용</label></th>
<td>
<?php echo editor_html("bo_insert_content", get_text($board['bo_insert_content'], 0)); ?>
</td>
이렇게 수정했습니다.
id와 name이 빠졌는데 그것때문일까요? 어디에 넣어야하나요..?
항상갑사합니다 그누보드고수님들!
답변 3개
채택된 답변
+20 포인트
adm/board_form.php 파일 하단 스크립트에 <?php echo get_editor_js("bo_insert_content"); ?> 추가
function fboardform_submit(f)
{
<?php echo get_editor_js("bo_content_head"); ?>
<?php echo get_editor_js("bo_content_tail"); ?>
<?php echo get_editor_js("bo_mobile_content_head"); ?>
<?php echo get_editor_js("bo_mobile_content_tail"); ?>
<?php echo get_editor_js("bo_insert_content"); ?>
참고 http://gnustudy.com/bbs/board.php?bo_table=gnu_tip&wr_id=228
답변을 작성하려면 로그인이 필요합니다.