관리자페이지 질문있습니당 채택완료

글쓰기 기본내용에 표를 삽입하고싶어서 원래 textarea였던걸 dhtml editor를 쓰도록 코드수정을 했습니다.

그런데 표를 다 입력한 후에 확인버튼을 누르면 textarea였을때 입력했던 내용으로 초기화 됩니다...

1028775886_1551320488.2835.png

>>확인누른 후

1028775886_1551320526.8507.png

코드는 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

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

업데이트가 전혀 안되고 있는 것으로 보입니다. 일반 글쓰기에 있는 editor_js 관련 부분을 참조 하셔서 스크립트 등이 정상 동작하도록 하신후 update 페이지를 통하여 정상적으로 업데이트가 되는지를 확인하시는게 좋을거 같습니다.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

submit부분에서도 에디터 관련 스크립트를 넣어주셔야 합니다.

write.skin.php에서 fwrite_submit 부분을 참조해보세요

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고