2011-12-23 4 views
4

팝업 (컬러 박스 또는 팬시 박스)에서 CKEditor를 열면 처음에는 정상적으로 작동합니다.크롬에서 팝업으로 두 번째 열면 CKEditor를 편집 할 수 없습니다.

팝업이 닫히고 열릴 때 콘텐츠 영역을 클릭 할 수 없으며 콘텐츠를 표시 할 수 없습니다.

하지만 "소스"버튼을 클릭하면 디자인 뷰에서 사용할 수있는 콘텐츠가 표시됩니다. IE와 Firefox에서는 괜찮습니다. 그러나 문제는 Chrome에서 발생합니다.

나는 CKEditor loading in Colorbox not working [ Google Chrome ]에서 말한 것을 따랐지만 여전히이 문제가 있습니다.

<html> 
<head> 
    <title>CKEditor Sample</title> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> 
    <script type="text/javascript" src="http://ckeditor.com/apps/ckeditor/3.6.2/ckeditor.js?1324772165"></script> 

    <link href="http://fancybox.net/js/fancybox-1.3.4/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" media="screen" /> 

    <script type="text/javascript" src="http://fancybox.net/js/fancybox-1.3.4/jquery.fancybox-1.3.4.js"></script> 

    <script type="text/javascript"> 

     $(function() { 
      if (CKEDITOR.instances['taCKEditor']) { 
       delete CKEDITOR.instances['taCKEditor']; 
      } 
      CKEDITOR.config.height = '500px'; 
      CKEDITOR.config.width = '500px'; 
      CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR; 
      CKEDITOR.config.shiftEnterMode = CKEDITOR.ENTER_P; 
      CKEDITOR.config.startupFocus = true; 
      CKEDITOR.config.baseFloatZIndex = 9000; 
      CKEDITOR.replace('taCKEditor', 
     { 
      uiColor: '#fdd1ad', 
      toolbar: 
      [ 
       ['Source', '-', 'NewPage', 'Preview'], 
       ['Cut', 'Copy', 'Paste', 'PasteText', '-', 'Print', 'SpellChecker'], 
       ['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'], 
       '/', 
       ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript'], 
       ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], 
       ['Link', 'Unlink', 'Anchor'], 
       ['Image', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak'], 
       '/', 
       ['Styles', 'Format', 'Font', 'FontSize'], 
       ['TextColor', 'BGColor'] 
      ] 
     }); 

      $("#various1").fancybox({ 
       'titlePosition': 'inside', 
       'transitionIn': 'none', 
       'transitionOut': 'none' 
      }); 
     }); 
    </script> 

</head> 
<body> 
    <a id="various1" href="#inline1" ">Open CKEditor</a> 
    <div id="inline1"> 
     <textarea id="taCKEditor" name="taCKEditor" rows="2" cols="5">This is the sample text inside CKEditor</textarea> 
    </div> 
</body> 
</html> 
+0

링크는 문제가있는 – JFK

+0

@ JFK를 보는 데 도움이 될 것입니다. 질문에 샘플을 포함 시켰습니다. – Prasad

+0

누구나 해결책을 얻었습니까? 크롬에 문제가 있습니다. – Prasad

답변

0

당신은 양식 및 양식 삽입 텍스트 영역 내부를 만들어야합니다

는 아래 난 내 응용 프로그램에서 무슨 샘플 코드입니다. 양식 ID에 fancybox를 지정하십시오. 자바 스크립트 트리거에서 양식을 클릭하십시오. fancybox 콜백 beforeLoad에서 인스턴스가 존재하는지 확인하는 CKEditor 로더를 사용하고, 인스턴스가 존재하지 않으면 제거합니다. beforeLoad에서는 html 블록에서 ckeditor 컨텐츠로로드됩니다.

관련 문제