0
저는 EditArea 편집기를 사용하고 있습니다. 함수가 있습니다 : editAreaLoader.execCommand
, 그것은 인자를 가진 인자와 명령의 id를받습니다. 그래서 코드 :함수 호출시 문제가 발생했습니다
$(document).ready(function() {
// Call go to line function after click at button
$('#line_go').click(function() {
console.log($('#line_to').val());
editAreaLoader.execCommand('example_1', 'go_to_line', $('#line_to').val());
});
// Try to do the same but after loading of the page
editAreaLoader.execCommand('example_1', 'go_to_line',$('#line_to').val());
});
HTML :
<input type="edit" name="line" id="line_to" value="15" />
<input type="button" name="line_go" id="line_go" value="Go" />
그래서, 페이지가로드의 아무 반응이 없을 때. 하지만 버튼 편집기를 클릭하면 # 15 행으로 바뀝니다. console.log
은 15
입니다.
예를 들어, execCommand
(두 번째로 페이지 로딩 후라고 함)을 경고와 함께 래핑하면 false를 반환합니다.
무엇이 잘못 되었습니까? 페이지 로딩 후 호출이 false를 반환하는 이유는 무엇입니까? 감사.
네, 맞습니다. 고마워요. – Ockonal