cheditor 에디터 글쓰고 DB에 저장할때 값이 안넘어옴

· 2010-08-17 (화) 18:08:42 · 3321 · 3
textarea를 사용해야 하는데요. 멀티기능이 필요하다고 해서 cheditor 를 써볼려고 합니다.

코딩을 cheditor2('wr_content', $content) 만 써서 쿼리문을 찍어 보니 wr_content 값만 안나와요.
(insert into test_table1 set no wr_content = '$wr_content'; 핵심만 적어었어요. )

값이 안나와서 cheditor2('wr_content', 11111) 이렇게 했더니 11111란 값이 넘어 옵니다.

에디터 사용 안함의 코딩인
<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><?}?>
를 써봤더니 값이 잘 넘어 오는데요.

cheditor2('wr_content', $content) 이건 왜 안돼는지 모르겠어요.
해결책좀 알려주세요.
|

댓글 3개

cheditor3 함수 참고하세요.

javascript 상 submit 시 실행되는 함수내에 있어야 해당 작성한 글이 넘어갑니다.
2010-08-17 (화) 18:27:37
빠른 답변 감사드립니다. 근데 제가 초보라 뭔소린지 이해를 못하고 있어요.
어떻게 수정해야 하는지.
board/basic/write.skin.php를 보고 한건데 어디를 어떻게 수정해야 하는지 모르겠어요.
cheditor2('wr_content', 11111) 했을때 값1111은 잘 넘어 오는데 말이죠. 알려주세요.
m(__)m
제일 상단에
<?
include_once("./_common.php");

define("_INDEX_", TRUE);

$g4[title] = "";
include_once("$g4[path]/head.php");

include_once("$g4[path]/lib/cheditor4.lib.php");
echo "<script src='$g4[cheditor4_path]/cheditor.js'></script>";
echo cheditor1('wr_content', '100%', '250');

?> 써 줬는데 이게 문제 있는 건가요?
음. 늦게 봐서 지금 남기네요.

상단 부분이 문제가 아닌.

form submit시 발생하는 자바스크립트 함수 내에 cheditor3 함수가 존재해야합니다.

음.. 이해하기 어려우셨다면.

기존 basic 스킨내에 cheditor3 으로 찾기 해보시면 어떤 말인지 찾기 쉬우실겁니다.
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
10-08-18 조회 1,645
10-08-17 조회 1,923
10-08-17 조회 1,620
10-08-17 조회 2,230
10-08-17 조회 1,639
10-08-17 조회 2,785
10-08-17 조회 2,940
10-08-17 조회 1,494
10-08-17 조회 2,560
10-08-17 조회 3,322
10-08-17 조회 2,468
10-08-17 조회 1,685
10-08-17 조회 1,627
10-08-17 조회 1,829
10-08-17 조회 1,622
10-08-17 조회 1,720
10-08-17 조회 1,596
10-08-17 조회 1,704
10-08-17 조회 1,710
10-08-17 조회 2,305