제가 이곳에서 찾아보다가 안되서 직접적용한 부분입니다.
게시판에서 에디터를 여러개 적용하는 법입니다. 아래 코드 그대로구여~
기존 write.skin.php에서 해당 코드부분을 아래코드로 변경하시면됩니다.
간단하구여 혹시나 중복이면 댓글주시면 따로 조치하겠습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($is_dhtml_editor) {
include_once("$g4[path]/lib/cheditor4.lib.php");
echo "<script src='$g4[cheditor4_path]/cheditor.js'></script>";
echo cheditor1('wr_9', '100%', '250');
echo cheditor1('wr_10', '100%', '250');
echo cheditor1('wr_content', '100%', '250');
}
?>
<script>
function doSubmit (theform)
{
myeditor1.outputBodyHTML();
myeditor2.outputBodyHTML();
myeditor3.outputBodyHTML();
document.text.value = myeditor1.outputBodyHTML();
document.text2.value = myeditor2.outputBodyHTML();
document.text3.value = myeditor3.outputBodyHTML();
}
</script>
<tr>
<td align="center" class="talen_wr_tit">text1</td>
<td colspan="3" align="center">
<? if ($is_dhtml_editor) { ?>
<input type="hidden" name="text" value="">
<textarea id="fm_post1" name="wr_9"></textarea>
<!-- 에디터를 화면에 출력합니다. -->
<script type="text/javascript">
var myeditor1 = new cheditor(); // 에디터 개체를 생성합니다.
myeditor1.config.editorHeight = '250px'; // 에디터 세로폭입니다.
myeditor1.config.editorWidth = '100%'; // 에디터 가로폭입니다.
myeditor1.inputForm = 'fm_post1'; // textarea의 ID 이름입니다.
myeditor1.run(); // 에디터를 실행합니다.
</script>
<? } else { ?>
<textarea class="text_style01" name="wr_9" id="fm_post1" value="<?=$write[wr_9]?>"><?=$write[wr_9]?></textarea>
<? }?>
</td>
</tr>
<tr>
<td align="center" class="talen_wr_tit">text2</td>
<td colspan="3" align="center">
<? if ($is_dhtml_editor) { ?>
<input type="hidden" name="text2" value="">
<textarea id="fm_post2" name="wr_10"></textarea>
<!-- 에디터를 화면에 출력합니다. -->
<script type="text/javascript">
var myeditor2 = new cheditor(); // 에디터 개체를 생성합니다.
myeditor2.config.editorHeight = '250px'; // 에디터 세로폭입니다.
myeditor2.config.editorWidth = '100%'; // 에디터 가로폭입니다.
myeditor2.inputForm = 'fm_post2'; // textarea의 ID 이름입니다.
myeditor2.run(); // 에디터를 실행합니다.
</script>
<? } else { ?>
<textarea class="text_style01" name="wr_10" id="fm_post2" value="<?=$write[wr_10]?>"><?=$write[wr_10]?></textarea>
<? }?>
</td>
</tr>
<tr>
<td align="center" class="talen_wr_tit">text3</td>
<td colspan="3" align="center">
<? if ($is_dhtml_editor) { ?>
<input type="hidden" name="text3" value="">
<textarea id="fm_post3" name="wr_content"></textarea>
<!-- 에디터를 화면에 출력합니다. -->
<script type="text/javascript">
var myeditor3 = new cheditor(); // 에디터 개체를 생성합니다.
myeditor3.config.editorHeight = '250px'; // 에디터 세로폭입니다.
myeditor3.config.editorWidth = '100%'; // 에디터 가로폭입니다.
myeditor3.inputForm = 'fm_post3'; // textarea의 ID 이름입니다.
myeditor3.run(); // 에디터를 실행합니다.
</script>
<? } else { ?>
<textarea class="text_style01" name="wr_content" id="fm_post3"><?=$write[wr_content]?></textarea>
<? }?>
</td>
</tr>
게시판에서 에디터를 여러개 적용하는 법입니다. 아래 코드 그대로구여~
기존 write.skin.php에서 해당 코드부분을 아래코드로 변경하시면됩니다.
간단하구여 혹시나 중복이면 댓글주시면 따로 조치하겠습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($is_dhtml_editor) {
include_once("$g4[path]/lib/cheditor4.lib.php");
echo "<script src='$g4[cheditor4_path]/cheditor.js'></script>";
echo cheditor1('wr_9', '100%', '250');
echo cheditor1('wr_10', '100%', '250');
echo cheditor1('wr_content', '100%', '250');
}
?>
<script>
function doSubmit (theform)
{
myeditor1.outputBodyHTML();
myeditor2.outputBodyHTML();
myeditor3.outputBodyHTML();
document.text.value = myeditor1.outputBodyHTML();
document.text2.value = myeditor2.outputBodyHTML();
document.text3.value = myeditor3.outputBodyHTML();
}
</script>
<tr>
<td align="center" class="talen_wr_tit">text1</td>
<td colspan="3" align="center">
<? if ($is_dhtml_editor) { ?>
<input type="hidden" name="text" value="">
<textarea id="fm_post1" name="wr_9"></textarea>
<!-- 에디터를 화면에 출력합니다. -->
<script type="text/javascript">
var myeditor1 = new cheditor(); // 에디터 개체를 생성합니다.
myeditor1.config.editorHeight = '250px'; // 에디터 세로폭입니다.
myeditor1.config.editorWidth = '100%'; // 에디터 가로폭입니다.
myeditor1.inputForm = 'fm_post1'; // textarea의 ID 이름입니다.
myeditor1.run(); // 에디터를 실행합니다.
</script>
<? } else { ?>
<textarea class="text_style01" name="wr_9" id="fm_post1" value="<?=$write[wr_9]?>"><?=$write[wr_9]?></textarea>
<? }?>
</td>
</tr>
<tr>
<td align="center" class="talen_wr_tit">text2</td>
<td colspan="3" align="center">
<? if ($is_dhtml_editor) { ?>
<input type="hidden" name="text2" value="">
<textarea id="fm_post2" name="wr_10"></textarea>
<!-- 에디터를 화면에 출력합니다. -->
<script type="text/javascript">
var myeditor2 = new cheditor(); // 에디터 개체를 생성합니다.
myeditor2.config.editorHeight = '250px'; // 에디터 세로폭입니다.
myeditor2.config.editorWidth = '100%'; // 에디터 가로폭입니다.
myeditor2.inputForm = 'fm_post2'; // textarea의 ID 이름입니다.
myeditor2.run(); // 에디터를 실행합니다.
</script>
<? } else { ?>
<textarea class="text_style01" name="wr_10" id="fm_post2" value="<?=$write[wr_10]?>"><?=$write[wr_10]?></textarea>
<? }?>
</td>
</tr>
<tr>
<td align="center" class="talen_wr_tit">text3</td>
<td colspan="3" align="center">
<? if ($is_dhtml_editor) { ?>
<input type="hidden" name="text3" value="">
<textarea id="fm_post3" name="wr_content"></textarea>
<!-- 에디터를 화면에 출력합니다. -->
<script type="text/javascript">
var myeditor3 = new cheditor(); // 에디터 개체를 생성합니다.
myeditor3.config.editorHeight = '250px'; // 에디터 세로폭입니다.
myeditor3.config.editorWidth = '100%'; // 에디터 가로폭입니다.
myeditor3.inputForm = 'fm_post3'; // textarea의 ID 이름입니다.
myeditor3.run(); // 에디터를 실행합니다.
</script>
<? } else { ?>
<textarea class="text_style01" name="wr_content" id="fm_post3"><?=$write[wr_content]?></textarea>
<? }?>
</td>
</tr>
댓글 3개
게시글 목록
| 번호 | 제목 |
|---|---|
| 2937 | |
| 2932 | |
| 2929 | |
| 2928 | |
| 2924 | |
| 2922 | |
| 2909 | |
| 2901 | |
| 2900 | |
| 2896 | |
| 2895 | |
| 2892 | |
| 2884 | |
| 2882 | |
| 2871 | |
| 2858 | |
| 2852 | |
| 2848 | |
| 2841 | |
| 2837 | |
| 2823 | |
| 2820 | |
| 2817 | |
| 2802 | |
| 2790 | |
| 2785 | |
| 2773 | |
| 2757 | |
| 2753 | |
| 2751 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기