미채택 완료

스마트에디터 여러개 사용하고싶습니다.

2015-09-24 (목) 02:36:26 4,047

a란 게시판에 wr_content2~14까지 필드를 추가로 만들었습니다.

문제는 탭부분의 2번3번은 본문의 에디터가 출력이 안됩니다.

아무래도 display:none; 이 영향이 잇는거 같은데.....이거 해결방법이없을가요 ㅜㅠ

write.skin.php

<?php 

$wr_content2_editor_html = editor_html('wr_content2', $write['wr_content2'], true);
$wr_content2_editor_js = '';
$wr_content2_editor_js .= get_editor_js('wr_content2', true);
$wr_content2_editor_js .= chk_editor_js('wr_content2', true);

$wr_content3_editor_html = editor_html('wr_content3', $write['wr_content3'], true);
$wr_content3_editor_js = '';
$wr_content3_editor_js .= get_editor_js('wr_content3', true);
$wr_content3_editor_js .= chk_editor_js('wr_content3', true);

?>
<style type="text/css">

.tab-content {
    display: none;
}

#tab-1 {
 display: block;  
}

</style>

<div id="tabs-container">
<ul class="tabs-menu">
        <li class="current"><a href="#tab-1">1</a></li>
        <li><a href="#tab-2">2</a></li>
        <li><a href="#tab-3">3</a></li>
</ul>
</div> 


   <div id="tab-1" class="tab-content">
            <?php echo $editor_html; ?>
   </div>

   <div id="tab-2" class="tab-content">
            <?php echo $wr_content2_editor_html; ?>
   </div>
   <div id="tab-3" class="tab-content">
            <?php echo $wr_content3_editor_html; ?>
   </div>

<script>
$(document).ready(function() {
    $(".tabs-menu a").click(function(event) {
        event.preventDefault();
        $(this).parent().addClass("current");
        $(this).parent().siblings().removeClass("current");
        var tab = $(this).attr("href");
        $(".tab-content").not(tab).css("display", "none");
        $(tab).fadeIn();
    });
}); 

하단스크립트부분

    function fwrite_submit(f)
    {
  <?php if ($board[bo_1] == "REVIEW") {
  echo $wr_content2_editor_js;
  echo $wr_content3_editor_js;
     } ?>
   <?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함   ?>

아래 생략........ 

|

답변 1개

<tr>

            <th scope="row"><label for="wr_1">내용<strong class="sound_only">필수</strong></label></th>

            <td class="wr_content">

                <?php if($write_min || $write_max) { ?>

                <!-- 최소/최대 글자 수 사용 시 -->

                <p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대 <strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>

                <?php } ?>

                <?php echo editor_html('wr_1', $write['wr_1'], $is_dhtml_editor); ?>

                <?php if($write_min || $write_max) { ?>

                <!-- 최소/최대 글자 수 사용 시 -->

                <div id="char_count_wrap"><span id="char_count"></span>글자</div>

                <?php } ?>

            </td>

        </tr>

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