html에디터에 폼 전송

html에디터에 폼 전송

작성일 2005.12.28댓글 1건
    게시물 수정 , 삭제는 로그인 필요

자바스크립트로 이루어진 html에디터에 특정 페이지를 삽입시키고 싶습니다.

빈 에디터가 뜨는게 아니라 뜰때 특정 페이지의 내용도 같이 뜨는거죠 ...

그래서 바로 에디터에서 수정할 수 있게 ^^;;;

 

어떻게 하면 될까요?

 

<html>
<head>
<TITLE>
에디터
</TITLE>
<meta CONTENT="Content-Type" HTTP-EQUIV="text/html;charset=euc-kr">
</head>
<link rel=stylesheet type='text/css' href='style/common.css'>
<link rel="stylesheet" type="text/css" href="style/style.css">
<script language='Javascript' src='script/editor.js'></script>
<script>
function init_alone() {
 init_zeditor(); 
 var ed = document.all;
 ed.web_layer.style.display="block";
 ed.html_layer.style.display="none";
 edtype = "web";
 editor_path = "";
}

</script>

<body onload="init_alone();">
<input type=hidden name=use_html value=2>

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse;" bordercolor="#CCCCCC" width="100%" id="AutoNumber1">

 <tr id=web_layer style="display:none;">
  <td width="100%" bgcolor=#EFEFEF height=400>

<font id='TextMode' style='display:inline'>
<table width='100%'cellpadding='0' cellspacing='0' border='0' bordercolorlight="#CCCCCC" bordercolordark=#FFFFFF>
 <tr>
  <td align=right>
   <table width='100%'cellpadding='0' cellspacing='0' border='0'>
    <tr>
     <td align=left>
<!--새글-->
      <button id="NewDoc" OnClick="ExecuteU(this.id)" class="BtnImg" OnMouseOver="ButtonUp(this);" OnMouseOut="ButtonOut(this);"><img src='images/new.gif' border=0 alt='새글' WIDTH=23 HEIGHT=22></button>
<!--스타일 선택-->
      <select class='login' style='width:70' onchange="block_style(this,'FormatBlock')"     onblur='this.selectedIndex=0;TextEditor.focus();' align=absmiddle>
        <option value>스타일
        <option value>------
        <option value='<p>'>보통
        <option value='<pre>'>서식
        <option value='<ADDRESS>'>주소
        <option value='<DD>'>정의
        <option value='<H6>'>제목 6
        <option value='<H5>'>제목 5
        <option value='<H4>'>제목 4
        <option value='<H3>'>제목 3
        <option value='<H2>'>제목 2
        <option value='<H1>'>제목 1
      </select>
<!--글꼴 선택-->
      <select class='login' style="width:80;" onchange="block_style(this, 'fontName')"          onblur='this.selectedIndex=0;TextEditor.focus();' align=absmiddle>
       <option value>글꼴
       <option value>------------
       <option value='굴림'>굴림
       <option value='궁서'>궁서
       <option value='돋움'>돋움
       <option value='바탕'>바탕
       <option value='Arial'>Arial
       <option value='Arial Black'>Arial
       <option value='Courier New'>Courier
       <option value='Impact'>Impact
       <option value='Verdana'>Verdana
       <option value='Webdings'>Webdings
       <option value='Wingdings'>Wingdings
      </select>
      <select class='login' style="width:50;" onchange="block_style(this, 'FontSize')"       onblur='this.selectedIndex=0;' align=absmiddle>
       <option value>크기
       <option value='1'>1
       <option value='2'>2
       <option value='3'>3
       <option value='4'>4
       <option value='5'>5
       <option value='6'>6
       <option value='7'>7
       </select>
      <img src='images/distinct.gif' border='0' align='absmiddle' WIDTH='2' HEIGHT='18'>
<!--취소버튼-->
      <button OnClick="SelectionCommand2(-1,'Undo');" class="BtnImg" OnMouseOver="ButtonUp(this);" OnMouseOut="ButtonOut(this);"><img src='images/undo.gif' border=0 alt='취소' WIDTH=23 HEIGHT=22></button>
<!--되살리기-->
      <button OnClick="SelectionCommand2(1,'Redo');" class="BtnImg" OnMouseOver="ButtonUp(this);" OnMouseOut="ButtonOut(this);"><img src='images/redo.gif' border=0 alt='되살리기' WIDTH=23 HEIGHT=22></button>
      <img src='images/distinct.gif' border='0' align='absmiddle' WIDTH='2' HEIGHT='18'>
<!--잘라내기-->
      <button OnClick="SelectionCommand(this,'Cut');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/IconCut.gif'border='0' alt='잘라내기(Ctrl + X)'></button>
<!--복사하기-->
      <button OnClick="SelectionCommand(this,'Copy');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/IconCopy.gif'border='0' alt='복사(Ctrl + C)'></button>
<!--붙여넣기-->
      <button OnClick="SelectionCommand(this,'Paste');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/IconPaste.gif'border='0' alt='붙여넣기(Ctrl + V)'></button>
<!--찾기 및 바꾸기-->
      <button id="Find" OnClick="ExecuteU(this.id)" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/Find.gif'border='0' alt='찾기 및 바꾸기'></button>
<!--**************-->
      <img src='images/distinct.gif' border='0' align='absmiddle' WIDTH='2' HEIGHT='18'>
<!--특수문자 넣기-->
      <button OnClick="ExecuteU('addChar')" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/SpecChar.gif'border='0' alt='특수문자넣기'></button>
<!-- 하이퍼 링크 -->
      <button OnClick="SelectionCommand(this,'CreateLink');" class='BtnImg' OnMouseOver='ButtonUp(this);'      OnMouseOut='ButtonOut(this);'><img src='images/link.gif' border='0' alt='링크걸기'></button>
<!-- 링크 삭제 -->
      <button OnClick="SelectionCommand(this,'Unlink');" class='BtnImg' OnMouseOver='ButtonUp(this);'      OnMouseOut='ButtonOut(this);'><img src='images/unlink.gif' border='0' alt='링크삭제'></button>
<!-- 이미지 삽입-->

      <button OnClick="window.open('addImage.jsp')" class='BtnImg' OnMouseOver='ButtonUp(this);'      OnMouseOut='ButtonOut(this);'><img src='images/image.gif'border='0' alt='이미지 삽입'></button>
<!--수평선 넣기-->
      <button id="addLine" OnClick="ExecuteU(this.id)" class="BtnImg" OnMouseOver="ButtonUp(this);"    OnMouseOut="ButtonOut(this);"><img src='images/IconHr.gif' border=0 alt='수평선삽입' WIDTH=18 HEIGHT=18></button>
      <img src='images/distinct.gif' border='0' align='absmiddle' WIDTH='2' HEIGHT='18'>
<!--테이블 삽입-->
      <button id="addTable" OnClick="ExecuteU(this.id)" class="BtnImg" OnMouseOver="ButtonUp(this);"    OnMouseOut="ButtonOut(this);"><img src='images/addTable.gif' border=0 alt='테이블 삽입' WIDTH=18 HEIGHT=18></button>
<!--테두리 0인 선들 보기-->
      <button id="ShowBorder" OnClick="ExecuteU(this.id)" class="BtnImg" OnMouseOver="ButtonUp(this);"    OnMouseOut="ButtonOut(this);"><img src='images/borders.gif' border=0 alt='테두리 0인 선들 보기' WIDTH=18 HEIGHT=18></button>
      </font>
     </td>
    </tr>
    <tr>
     <td align=left>
<!--글꼴효과-->
<!--굵게-->

      <button OnClick="SelectionCommand(this,'Bold');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/FormatBold.gif'border='0' alt='굵게'></button>
<!--기울게-->
      <button OnClick="SelectionCommand(this,'Italic');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/FormatItalic.gif'border='0' alt='이텔릭체'></button>
<!--밑줄-->
      <button OnClick="SelectionCommand(this,'Underline');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/FormatUnderline.gif'border='0' alt='밑줄'></button>
<!--취소선-->
      <button OnClick="SelectionCommand(this,'StrikeThrough');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/FormatStrike.gif'border='0' alt='취소선'></button>
<!--아래첨자-->
      <button OnClick="SelectionCommand(this,'SubScript');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/FormatSub.gif'border='0' alt='아래첨자'></button>
<!--윗첨자-->
      <button OnClick="SelectionCommand(this,'SuperScript');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/FormatSuper.gif'border='0' alt='윗첨자'></button>
<!--글자색-->
      <button OnClick="ChFontColor('ForeColor');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/FormatFGcolor.gif'border='0' alt='글자색'></button>
<!--글자 배경색-->
      <button OnClick="ChFontColor('BackColor');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/FormatBGcolor.gif'border='0' alt='글자 배경색'></button>
<!--글꼴효과지우기-->
      <button OnClick="SelectionCommand(this,'RemoveFormat');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/FormatRemove.gif'border='0' alt='글꼴효과지우기'></button>

      <img src='images/distinct.gif' border='0' align='absmiddle' WIDTH='2' HEIGHT='18'>
<!-- 배경색 -->
      <button OnClick="ExecuteU('bgColor')" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/bgColor.gif'border='0' alt='배경색 변경'></button>
      
      <img src='images/distinct.gif' border='0' align='absmiddle' WIDTH='2' HEIGHT='18'>
<!-- 정렬 -->
      <button OnClick="SelectionCommand(this,'JustifyLeft');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/align_left.gif'border='0' alt='좌측정렬'></button>
      <button OnClick="SelectionCommand(this,'JustifyCenter');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/align_center.gif'border='0' alt='가운데정렬'></button>
      <button OnClick="SelectionCommand(this,'JustifyRight');" class='BtnImg' OnMouseOver='ButtonUp(this);'  OnMouseOut='ButtonOut(this);'><img src='images/align_right.gif'border='0' alt='우측정렬'></button>
      <button OnClick="SelectionCommand(this,'JustifyFull');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/align_full.gif'border='0' alt='양쪽정렬'></button>
      <button OnClick="SelectionCommand(this,'JustifyNone');" class='BtnImg' OnMouseOver='ButtonUp(this);' OnMouseOut='ButtonOut(this);'><img src='images/align_none.gif'border='0' alt='정렬없음'></button>

      <img src='images/distinct.gif' border='0' align='absmiddle' WIDTH='2' HEIGHT='18'>
<!-- 문단 효과-->
      <button OnClick="SelectionCommand(this,'Indent');" class='BtnImg' OnMouseOver='ButtonUp(this);'      OnMouseOut='ButtonOut(this);'><img src='images/IconIndent.gif'border='0' alt='들여쓰기 늘임'></button>
      <button OnClick="SelectionCommand(this,'Outdent');" class='BtnImg' OnMouseOver='ButtonUp(this);'      OnMouseOut='ButtonOut(this);'><img src='images/IconOutdent.gif'border='0' alt='들여쓰기 줄임'></button>
      <button OnClick="SelectionCommand(this,'InsertOrderedList');" class='BtnImg' OnMouseOver='ButtonUp(this);'    OnMouseOut='ButtonOut(this);'><img src='images/IconOrdered.gif'border='0' alt='번호있는 목록'></button>
      <button OnClick="SelectionCommand(this,'InsertUnOrderedList');" class='BtnImg' OnMouseOver='ButtonUp(this);'    OnMouseOut='ButtonOut(this);'><img src='images/IconUnOrdered.gif'border='0' alt='번호없는 목록'></button>
      <img src='images/distinct.gif' border='0' align='absmiddle' WIDTH='2' HEIGHT='18'>
<!--도움말-->
      <button id="ShowHelp" OnClick="ExecuteU(this.id)" class="BtnImg" OnMouseOver="ButtonUp(this);" OnMouseOut="ButtonOut(this);"><img src='images/help.gif' border=0 alt='도움말' WIDTH=16 HEIGHT=16></button>
<!--에디터정보-->
      <button id="ShowAbout" OnClick="ExecuteU(this.id)" class="BtnImg" OnMouseOver="ButtonUp(this);" OnMouseOut="ButtonOut(this);"><img src='images/about.gif' border=0 alt='에디터정보' WIDTH=18 HEIGHT=18></button>
     </td>
    </tr>
    <tr>
     <td align=left width=1 height=1 bgcolor=#CCCCCC></td>
    </tr>
   </table>
  </td>
 </tr> 
</table>
<font id='TextEditView' style='width: 100%; height: 100%;display: inline;'>
<iframe id='TextEditor' frameborder="0" width="100%" height='100%'
  marginwidth="5" marginheight="5" topmargin="5"
  scrolling="auto"
  STYLE="border-right: solid FFFFFF 1px; border-left: solid FFFFFF 1px;
     border-top: solid FFFFFF 1px; border-bottom: solid FFFFFF 1px;"
  border="1" class=editor_body></iframe>
</font>

  </td>
 </tr>
 <tr id=html_layer style="display:block;">
  <td width="100%" height=400 valign=top>
   <table cellpadding=0 cellspacing=0 border=0 class=tb_normal  width="100%" height="100%">
    <tr>
     <td height='100%' align=top style='word-break:break-all' height='100%'>
      <textarea name=html_body class=comm style='width:100%;height:100%' wrap=virtual rows="10" cols="20"></textarea>
     </td>
    </tr>
   </table>  
  </td>
 </tr>
 <tr id=preview_layer style="display:none;">
  <td width="100%" height=400>
   <table cellpadding=0 cellspacing=0 border=0 class=tb_normal  width="100%" height="100%">
    <tr>
     <td height=46 bgcolor=#EFEFEF>작성하신 문서는 저장후 이렇게 보일겁니다.<BR>
      단 스타일이 적용된 경우 다르게 보일 수 있습니다.
     </td>
    </tr>
    <tr>
     <td bgcolor=#CCCCCC height=1></td>
    </tr>
    <tr>
     <td height="100%" class=preview id=pre_content style='word-break:break-all' valign="top">
     </td>
    </tr>
   </table>
  </td>
 </tr>
 <tr id=temp_layer style="display:none;">
  <td id=temp_content width="100%"></td>
 </tr>
 <tr>
  <td bgcolor=#EFEFEF>
   <input type=checkbox name=pre_check onClick="zcontent_preview(this)" value="ON"><font size="2">미리보기</font>
         <input type=radio name=editor_type value=web onclick="chgEditorType(this.value)" checked><font size="2">웹&nbsp;&nbsp;
        </font>
   <input type=radio name=editor_type value=html onclick="chgEditorType(this.value)" ><font size="2">html 직접입력&nbsp;&nbsp;
        </font>
      
 </tr>
</table>
</form>
</BODY>
</HTML>
에디터 메인 페이지는 이렇게 생겼네요 ^^;;;



profile_image 익명 작성일 -

같은 도메인내에 있는문서라면

function init_alone() 에 iframe의 location 속성에 값을 주어서 초기 문장을 넣으실 수 있습니다.

 

function init_alone() {
 init_zeditor();
 var ed = document.all;
 ed.web_layer.style.display="block";
 ed.html_layer.style.display="none";
 edtype = "web";
 editor_path = "";
 TextEditor.location="같은도메인내에있는html문서.htm";
}

html에디터에 폼 전송

자바스크립트로 이루어진 html에디터에 특정 페이지를 삽입시키고 싶습니다. 빈 에디터가 뜨는게 아니라 뜰때 특정 페이지의 내용도 같이...

글쓰기 에디터 화면 구현 (코딩)

... 어떤 것으로 구현하는지 (자바스크립트인지 html인지... 에디터를 로드시키는것은 매뉴얼을 참고하면 어렵지 않습니다. 하지만 이미지 첨부 기능이나, 폼 전송 이후에...

폼 전송에 관한 간단한...

... 나모웹에디터에서 자바스크립트를 이용해서 상품... 예를들어 성함: 고유번호: 주소: 전화번호: 전송 취소... 페이지 html 작성해서 제 메일로 첨부해서 보내주시면...

나모 웹에디터 - 자바스크립트 내공 30

나모 웹에디터로 하는 건데요 테이블 전체 - 테두리 두께 : 2, 셀 간격 5, 배경색... 이 (자바스크립트를 이용한) 메일은 전송시 사용자 PC의 메일클라이언트 (아웃룩...

나모 웹에디터로 홈페이지 만들기

... 서버로 전송됩니다. 필드는 그 유형에 따라 작동... 나모 웹에디터에서 작성한 필드를 오프라인에서... 웹 문서를 저장하면 스마트 클립아트는 '[HTML 파일 이름]...

홈페이지는 완성이 되었는데... 그 후로는?

... com/i2.html) 이라는 곳에서 받고 있습니다. 웹호스팅비로 1년에 99,000원 내고 있으며... 알FTP와 같은 무료프로그램으로도 전송(업로드,출판) 가능합니다. 저는 나모웹에디터...