2017-04-03 1 views
0

나는 편집자 내용에 집중하려고 애 쓰고있다. 초점 위치는 내용의 시작 부분에 놓이지 만 내용 뒤에 있어야합니다. 초점 위치를 텍스트 끝으로 옮기는 방법을 제안 해 주시겠습니까?TinyMCE 틀린 초점 위치

setup: function (editor) { 
    editor.on('init', function() { 
     editor.focus(); 
     editor.selection.select(editor.getBody(), true); 
     editor.selection.collapse(false); 
    }); 
} 

이 내용의 맨 끝으로 커서를 이동해야합니다 : 다음 추가 할 수 있습니다 init을 여기

<html> 
<body> 
    <textarea id="mytextarea"> 
     The focus will appear before this text. Should be after. 
    </textarea> 
<script> 
    tinymce.init({ 
     selector: '#mytextarea', 
     menubar: false, 
    }); 

    setTimeout(function() { 
     tinymce.execCommand('mceFocus'); 
    }, 2000) 
</script> 
</body> 
</html> 

는 TinyMCE에에서 작업 예를 https://jsfiddle.net/iosipov83/o10ut0g1/

+0

가능한 중복 (http://stackoverflow.com/questions/43179508/wrong-focus-position-on-tinymce) –

답변

0

입니다.

(참고 : 누군가가 설명을 요구 때 원래의 게시물을 업데이트하는 것이 더했을 것이다 ... 당신의 질문을 게시 두 번하지 마십시오)

[TinyMCE에에 잘못 초점 위치]의