추가한 필드에 에디터를 적용하고 싶습니다. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

추가한 필드에 에디터를 적용하고 싶습니다. 정보

추가한 필드에 에디터를 적용하고 싶습니다.

본문

추가한 필드에 에디터를 적용할려고 합니다
에디터는 보이는데 DB에 저장이 안되네요
검색해봐도 내용이 없어서 글 남깁니다.


아래는 수정한 내용 입니다.

write.skin.php

if ($is_dhtml_editor) {
    include_once("$g4[path]/lib/cheditor4.lib.php");
    echo "<script src='$g4[cheditor4_path]/cheditor.js'></script>";
    echo cheditor1('wr_content', '100%', '250');
    echo cheditor1('wr_5', '100%', '120');
    echo cheditor1('wr_6', '100%', '120');
}
?>

<tr>
    <td class=write_head style='padding-left:20px;'>연구목적</td>
    <td style='padding:5 0 5 0;'>
      <? if ($is_dhtml_editor) { ?>
            <?=cheditor2('wr_5', $write[wr_5]);?>
        <? } else { ?>
        <table width=100% cellpadding=0 cellspacing=0>
        <tr>
            <td width=50% align=left valign=bottom>
                <span style="cursor: pointer;" onclick="textarea_decrease('wr_5', 10);">
<img src="<?=$board_skin_path?>/img/up.gif"></span>
                <span style="cursor: pointer;" onclick="textarea_original('wr_5', 10);">
<img src="<?=$board_skin_path?>/img/start.gif"></span>
                <span style="cursor: pointer;" onclick="textarea_increase('wr_5', 10);">
<img src="<?=$board_skin_path?>/img/down.gif"></span></td>
            <td width=50% align=right><? if ($write_min || $write_max) { ?><span id=char_count></span>글자<?}?></td>
        </tr>
        </table>
        <textarea id="wr_5" name="wr_5" class=tx style='width:100%; word-break:break-all;' rows=10 itemname="연구목적" required
        <? if ($write_min || $write_max) { ?>onkeyup="check_byte('wr_5', 'char_count');"<?}?>><?=$write[wr_5]?></textarea>
        <? if ($write_min || $write_max) { ?><script language="javascript"> check_byte('wr_5', 'char_count'); </script><?}?>
        <? } ?>
    </td>
       
</tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>


<tr>
    <td class=write_head style='padding-left:20px;'>연구내용</td>
    <td style='padding:5 0 5 0;'>
        <? if ($is_dhtml_editor) { ?>
            <?=cheditor2('wr_content', $content);?>
        <? } else { ?>
        <table width=100% cellpadding=0 cellspacing=0>
        <tr>
            <td width=50% align=left valign=bottom>
                <span style="cursor: pointer;" onclick="textarea_decrease('wr_content', 10);"><img src="<?=$board_skin_path?>/img/up.gif"></span>
                <span style="cursor: pointer;" onclick="textarea_original('wr_content', 10);"><img src="<?=$board_skin_path?>/img/start.gif"></span>
                <span style="cursor: pointer;" onclick="textarea_increase('wr_content', 10);"><img src="<?=$board_skin_path?>/img/down.gif"></span></td>
            <td width=50% align=right><? if ($write_min || $write_max) { ?><span id=char_count></span>글자<?}?></td>
        </tr>
        </table>
        <textarea id="wr_content" name="wr_content" class=tx style='width:100%; word-break:break-all;' rows=10 itemname="내용" required
        <? if ($write_min || $write_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?>><?=$content?></textarea>
        <? if ($write_min || $write_max) { ?><script language="javascript"> check_byte('wr_content', 'char_count'); </script><?}?>
        <? } ?>
    </td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>

<tr>
    <td class=write_head style='padding-left:20px;'>활용계획</td>
    <td style='padding:5 0 5 0;'>
      <? if ($is_dhtml_editor) { ?>
            <?=cheditor2('wr_6', $write[wr_6]);?>
        <? } else { ?>
        <table width=100% cellpadding=0 cellspacing=0>
        <tr>
            <td width=50% align=left valign=bottom>
                <span style="cursor: pointer;" onclick="textarea_decrease('wr_6', 10);">
<img src="<?=$board_skin_path?>/img/up.gif"></span>
                <span style="cursor: pointer;" onclick="textarea_original('wr_6', 10);">
<img src="<?=$board_skin_path?>/img/start.gif"></span>
                <span style="cursor: pointer;" onclick="textarea_increase('wr_6', 10);">
<img src="<?=$board_skin_path?>/img/down.gif"></span></td>
            <td width=50% align=right><? if ($write_min || $write_max) { ?><span id=char_count></span>글자<?}?></td>
        </tr>
        </table>
        <textarea id="wr_6" name="wr_6" class=tx style='width:100%; word-break:break-all;' rows=10 itemname="활용계획" required
        <? if ($write_min || $write_max) { ?>onkeyup="check_byte('wr_6', 'char_count');"<?}?>><?=$write[wr_6]?></textarea>
        <? if ($write_min || $write_max) { ?><script language="javascript"> check_byte('wr_6', 'char_count'); </script><?}?>
        <? } ?>
    </td>
       
</tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
  • 복사

댓글 전체

하단 스크립트 부분에

if ($is_dhtml_editor) echo cheditor3('wr_content'); //이라인 처럼 추가 하세요

if ($is_dhtml_editor) echo cheditor3('wr_5');
if ($is_dhtml_editor) echo cheditor3('wr_6');
© SIRSOFT
현재 페이지 제일 처음으로