k

geditor 에서 테이블 입력시 border=0으로 설정하고 입력하기

테이블 입력시 border=0으로 일일이 수정하는것이 귀찮아졌습니다.

또 0으로 해놓으면 막상 편집시에 불편하고

대략.. 난감하더군요..

geditor.js 파일을 열어보면

this.init = function() {
    ge_editor = document.getElementById(ge_iframe).contentWindow.document;
    ge_editor.designMode = "on";
    ge_editor.write("<html>");
    ge_editor.write("<head>");
    ge_editor.write("<style type=\"text/css\">")
    ge_editor.write("body { padding:0px; margin:5px; font-size:10pt; font-family:Dotum; }");
    ge_editor.write("td { font-size:10pt; font-family:Dotum; border:dashed 1px #efefef}");
    ge_editor.write("</style>");
    ge_editor.write("</head><body>");
    ge_editor.write(ge_code);
    ge_editor.write("</body></html>");
    ge_editor.close();

이부분이 있습니다.
위의 빨간색처럼 td에 border 스타일을 적용하면
테이블 테두리가 글 편집시에만 보이고 실제 입력시에는 적용이 안됩니다.

아래의 곳에서 border=0으로 하시면 됩니다.

this.insert_table_mouse_click = function(row,col)
{
    var table = "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">";
    var width = Math.floor(100/col);
    for (var i=0; i<row; i++) {
        table += "<tr>";
        for (var j=0; j<col; j++) {
            table += "<td width=\""+width+"%\">&nbsp;</td>";
        }
        table += "</tr>";
    }
    table += "</table><br/>";

    this.insert_editor(table);
}

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

그누4 팁자료실

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

+
제목 글쓴이 날짜 조회
17년 전 조회 4,876
17년 전 조회 6,147
17년 전 조회 5,922
17년 전 조회 2,539
17년 전 조회 2,531
17년 전 조회 4,320
17년 전 조회 2,085
17년 전 조회 8,376
17년 전 조회 5,610
17년 전 조회 1,870
17년 전 조회 4,555
17년 전 조회 4,297
17년 전 조회 3,195
17년 전 조회 4,145
17년 전 조회 3,604
17년 전 조회 2,800
17년 전 조회 3,766
17년 전 조회 7,303
17년 전 조회 9,763
17년 전 조회 3,297
🐛 버그신고