간단한 텍스트 상자를 wysihtml5 editor을 사용하는 편집 기능이있는 텍스트 상자로 변환했습니다. 이 프로젝트는 텍스트 상자에 html을 iframe에 삽입해야합니다. 에디터를 설치하기 이전에는 모든 것이 잘 작동했습니다. 이제 편집기가 텍스트 영역을 iframe으로 변환했기 때문에 iframe 삽입을위한 jQuery가 더 이상 작동하지 않습니다. 다음 jQuery를 편집기로 변환하는 방법에 대한 아이디어가 있습니까?wysihtml5 텍스트 영역에서 iframe에 삽입
(function() {
var frame = $('iframe#preview'),
contents = frame.contents(),
body = contents.find('body'),
styleTag = contents
.find('head')
.append('<style>*{font-family:arial}h2{color:#CC6600}</style>')
.children('style');
$('textarea').focus(function() {
var $this = $(this);
$this.keyup(function() {
body.html($this.val());
});
});
})();
$('textarea').focus
전화에서 뭔가를 변경해야한다는 것을 알고 있습니다. 무엇이 있는지 모릅니다. 나는 javascript/jQuery 세계에 익숙하지 않고 몇 가지 가능성을 시도했지만, 지금까지이 것을 파악할 수 없었다.
통찰력에 대해 많은 감사드립니다.