2011-04-18 4 views

답변

0

저는 YUI3을 사용하고 있습니다. 그러나 YUI2에서는 여전히 작동 할 수 있습니다. 콘텐츠로 편집기를 초기화하는 대신 내용을 execCommand('insertandfocus','content')으로 추가합니다. 대신이의 예를 들어

:

YUI().use('editor', function(Y) { 
    var yuiEditor = new Y.EditorBase(); 
    ... 
    yuiEditor.on('frame:ready', function() { 
    this.focus(function(){ 
     yuiEditor.execCommand('insertandfocus', myPreloadedContent); 
    }); 
    }); 
    ... 
}); 
:

YUI().use('editor', function(Y) { 
    var yuiEditor = new Y.EditorBase({ 
    content: myPreloadedContent 
    }); 
    ... 
    yuiEditor.on('frame:ready', function() { 
    this.focus(); 
    }); 
    ... 
}); 

이 같은 내용을 삽입하고있어

관련 문제