2014-01-18 2 views
2

jQuery UI, 특히 탭에서 CKEditor 인라인 편집 작업을하는 데 어려움이 있습니다. 누구든지 작동하도록하는 방법을 알고 있습니까? jQuery UI에서 CKEditor를 작동하게하는 플러그인이 있습니까?CKEditor jQuery UI에서 인라인 편집

답변

1

저는 오늘 아침 이후로 같은 문제로 고생하고 있지만 수정 사항을 발견했습니다.

var objCKeditor = new Object({ 
    config: base_url + "library/applications/ckeditor/config.simple.js" 
}); 
var objTab = new Object({ 
    active: false 
}); 
CKEDITOR.disableAutoInline = true; 
// Activate your editors when the tabs themselves are activated. 
$(".navigation-tabs").on("tabsactivate", function(event, ui) { 
    // Find which tab has been chosen by the user. 
    objTab.chosen = $(this).tabs('option', 'active'); 
    // Only initialize the editors once... 
    if ((objTab.chosen == 3) && (objTab.active == false)) { 
     // Loop through the editors. 
     $('div.link-bookmark-comment').each(function() { 
      // Find the ID for the editor. 
      objCKeditor.editor = $(this).attr('id'); 
       // ... which is facilitated by this boolean. 
       objTab.active = true; 
       CKEDITOR.inline(objCKeditor.editor, { customConfig: objCKeditor.config }); 
     }); 
    } 
}); 

그래서, CKEditor가 탭 내에 배치, 또는 처음에 숨겨진 개체 수 좋아하지 않는 것으로 생각된다.

3

나는 비슷한 문제가 있었는데, 브라우저가 아직 렌더링되지 않은 "숨겨진"또는 "비활성화 된"구성 요소를 어떻게 처리하고 있었는지 밝혀졌습니다.

http://ckeditor.com/ticket/9814은 인스턴스가 준비 될 때 readOnly 상태를 변경하기 위해 리스너를 추가하는 예제를 제공합니다.

var ck = CKEDITOR.inline(element); 
ck.on('instanceReady', function(ev) { 
    var editor = ev.editor; 
    editor.setReadOnly(false); 
}); 
+0

감사합니다. 답변을 수락해야합니다. – userlond

관련 문제