o

cheditor 글쓰기 박스 자동으로 늘어 나기

에디터에 글을 쓰면 에디터가 자동을 늘어나는 기능
글이 삭제하면 줄어든다

cheditor 에 cheditor.js 에 보면

2539 라인쯤에
doOnKeyUp : function () {
this.config.keyUpCount++;
},
이 있다

doOnKeyUp : function () {
parent.checker();
this.config.keyUpCount++;
},
위와 같이 parent.checker();
를 추가 한다

write.skin 에 아래를 추가한다
<script type="text/javascript">
//에디터 줄늘어 나는 함수
//------------------------------------
function checker()
{
var height = 0 ;
jQuery("#wr_content_td iframe").contents().find("body > div").each(function (){
height += jQuery(this).height();
});
jQuery("#wr_content_td iframe").contents().find("body > p").each(function (){
height += jQuery(this).height();
});
if(height > 210)
{
jQuery("#wr_content_td iframe").height(height+40);
}
else
{
jQuery("#wr_content_td iframe").height(250);
}
}
//------------------------------------
//에디터 줄늘어 나는 함수 완료
</script>
|

댓글 1개

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

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
12-08-17 조회 1.8만
12-08-16 조회 6,867
12-08-15 조회 9,230
12-08-14 조회 5,274
12-08-14 조회 6,035
12-08-10 조회 3,877
12-08-08 조회 5,338
12-08-06 조회 3,776
12-08-04 조회 5,795
12-08-02 조회 5,128
12-08-01 조회 8,488
12-07-29 조회 1만
12-07-27 조회 4,403
12-07-25 조회 6,716
12-07-21 조회 5,664
12-07-20 조회 9,370
12-07-20 조회 6,020
12-07-17 조회 5,644
12-07-12 조회 6,471
12-07-10 조회 4,697