Á¦¸ñ   ÀÚ½ÅÀÇ °Ô½ÃÆÇ¿¡ CKEditor HTML ÆíÁý±â Ãß°¡Çϱâ
¿Ã¸°ÀÌ Á¤¼ºÈÆ ³¯Â¥ 2017-06-05 [15:29] Á¶È¸¼ö 15127

CKEditor ´Â °Ô½ÃÆÇ¿¡ WYSIWYG(À§ÁöÀ¨) ¿¡µðÅ͸¦ Ãß°¡ÇÏ°Ô ÇØÁÝ´Ï´Ù.

´ÙÀ½°ú °°Àº °£´ÜÇÑ ÀýÂ÷·Î Ãß°¡ÇÒ ¼ö ÀÖ½À´Ï´Ù.

  1. http://ckeditor.com/  ¿¡¼­ ÃֽŠÇÁ·Î±×·¥ ´Ù¿î·Îµå
  2. ÀÚ½ÅÀÇ ¼­¹ö¿¡ ¼³Ä¡
  3. ±Û¾²±â ÆäÀÌÁö¿¡ ´ÙÀ½ Ãß°¡
    <script language="javascript" src="/¼³Ä¡µð·ºÅ丮/ckeditor.js"></script>
  4. <TEXTAREA> ű׿¡ ´ÙÀ½ Ãß°¡
    <textarea rows="15" cols="80" class="ckeditor" id="my_editor"  name="content"> </textarea>

 

ÇÁ·Î±×·¥À» ´Ù¿î·ÎµåÇÏ¿© ¼³Ä¡ÇÏÁö ¾Ê°íµµ °¡´ÉÇÕ´Ï´Ù.

  1. ±Û¾²±â ÆäÀÌÁö¿¡ ´ÙÀ½ Ãß°¡

    <script type="text/javascript" src="//s1.ckeditor.com/themes/ckeditor4/vendor/ckeditor/4.7.0/ckeditor.js"></script>

    ȤÀº

    <script language="javascript" src="http://itsys.hansung.ac.kr/WebEditor2/ckeditor.js"></script>

     

CKEditor ¿¡ ÀÛ¼ºµÈ ±Û È®ÀÎ ¹æ¹ý

±³Àç write_form.php ¿¡ Ãß°¡ ½Ã¿¡´Â ¾Æ·¡¿Í °°ÀÌ ³»¿ë È®ÀÎÇÏ´Â ºÎºÐÀ» ¼öÁ¤ÇؾßÇÕ´Ï´Ù.

<script>
  function check_input()
   {
      if (!document.board_form.subject.value)
      {
          alert("Á¦¸ñÀ» ÀÔ·ÂÇϼ¼¿ä1");   
          document.board_form.subject.focus();
          return;
      }

      if (!CKEDITOR.instances.my_editor.getData())
      {
          alert("³»¿ëÀ» ÀÔ·ÂÇϼ¼¿ä!");   
          CKEDITOR.instances.my_editor.focus();
          return;
      }

      /*
      if (!document.board_form.content.value)
      {
          alert("³»¿ëÀ» ÀÔ·ÂÇϼ¼¿ä!");   
          document.board_form.content.focus();
          return;
      }
       */
      document.board_form.submit();
   }
</script>

 

±âŸ ¼³Á¤¹æ¹ýÀº ±¸±ÛÀ̳ª ¾Æ·¡ ¸µÅ©¿¡¼­ È®ÀÎÇϼ¼¿ä.

ÀÌ»óÀÔ´Ï´Ù.

 

Á¤¼ºÈÆ