, TinyMCE에하지 aplpy CSS를 수행
내 HTML :
<div class="tab-pane active" id="tab1">
<div id="description_content">
<div class="text_description_content"><div class="mce-content-body"> <textarea class="tmpTextArea">{{project.description|raw }} </textarea></div></div>
</div>
<div id="toAppend" class="mce-content-body"></div>
</div>
내 JS :
//activate tinyMCE
tinymce.init({
selector: '.tmpTextArea',
menubar: false,
plugins: [
'advlist autolink lists link image charmap print preview anchor',
'searchreplace visualblocks code fullscreen',
'insertdatetime media table contextmenu paste code'
],
toolbar: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
content_css: '//www.tinymce.com/css/codepen.min.css'
});
//get what is inside the textarea editor
var content = $('iframe').contents().find('#tinymce').contents();
//append it in a div
$("#toAppend").append(content);
//disable edit
tinymce.activeEditor.hide();
//hide the textarea editor
$(".tmpTextArea").hide();
희망이 다른 하나를 도울 수 있습니다 :)
그게 요점입니다. 그렇다면이 CSS를이 텍스트에 어떻게 적용 할 수 있습니까? 어쩌면 이것을 허용하는 자바 스크립트 코드가 있습니까? 내가 구름 배치를 사용하고 있기 때문에 – LedZelkin
외부 콘텐츠가 편집기 또는 편집기에서 외부 콘텐츠처럼 보이게하고 싶습니까? –
외부 콘텐츠가 편집기에서 보이는 것처럼 – LedZelkin